-
Notifications
You must be signed in to change notification settings - Fork 0
/
TemplateFiberData.h
58 lines (46 loc) · 1.98 KB
/
TemplateFiberData.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
#pragma once
#include "FiberData.h"
#include "ColorTable.h"
#include "CylindProj.h"
#include "mds.h"
class TemplateFiberData :
public FiberData
{
public:
TemplateFiberData(void);
~TemplateFiberData(void);
friend CylindPoint getProjection (const TemplateFiberData *templateData, const FloatPoint* fib);
private:
vector<CylindPoint> _clusterEmbeds;
QStringList _clusterLabels;
vector<int> _clusterBuf;
bool _bShowLabels;
unsigned _totalPtCount;
ColorTable * _clusterColorTable;
public:
static
TemplateFiberData* templateData;
public:
void loadClusterEmbeddings (const QString &fileName);
void loadClusterLabels (const QString &fileName);
void requireData (bool bFibers, bool bClusters, bool bEmbs, bool bLabels);
void tractMDS ();
void clusterMDS ();
float getTplColorIndex (int clusterIndex);
static uchar * getTplColor (int clusterIndex);
static void drawAtlasEmbeds(float cylindRadius, bool bShowLabels = true, bool bColorTpl = false);
static void drawAtlasTracts();
static void drawAtlasTracts(vector<int> &highlightClusters);
static vector<float> getAtlasNeighbors (const FloatPoint *targetFib, int numOfNeighbors, float &minBundleDist);
static EmbedPoint getEmbedding (const FloatPoint *targetFib);
static CylindPoint lleEmbedding (const FloatPoint *targetFib, float &minBundleDist);
static float* getAtlasDistMatrixGPU (FiberData *fibData);
static CylindPoint lleEmbedding (float *distVec, int numOfNeighbors, float &minBundleDist);
static vector<float> getAtlasWeights (float *distVec, int numOfNeighbors, float &minBundleDist);
static EmbedPoint * getEmbeddingsGPU (FiberData *fibData, int numOfNeighbors = 20);
static CylindPoint cylindEmbedding (const FloatPoint *targetFib);
static float dist (const FloatPoint *f1, const FloatPoint *f2);
static float symDist (const FloatPoint *f1, const FloatPoint *f2);
static QStringList clusterLabels();
static CylindPoint clusterEmb (int clusterIdx, int left);
};