-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathcolorAtrophyExtent.py
More file actions
53 lines (41 loc) · 1.51 KB
/
colorAtrophyExtent.py
File metadata and controls
53 lines (41 loc) · 1.51 KB
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
import sys
import os
vwFullPath = os.path.abspath(".")
print(vwFullPath)
sys.path.append(vwFullPath)
from blenderCol import *
painter = CorticalPainter()
painter.prepareScene()
file = os.getenv('file')
pngFile = os.getenv('pngFile')
isCluster = os.getenv('isCluster')
#file = 'resfiles/adniThMo10kCl4_VWDPMLinear/params_o30.npz'
print('loading file %s' % file)
# print(ads)
dataStruct = pickle.load(open(file, 'rb'))
clustProbBC = dataStruct['clustProbBC']
plotTrajParams = dataStruct['plotTrajParams']
biomkValuesThresh = dataStruct['biomkValuesThresh']
nrClust = clustProbBC.shape[-1]
# def plotTrajWeightedDataMean(self, data, diag, dps, longData, longDiag, longDPS, thetas, variances, clustProbBCColNorm, plotTrajParams,
# trajFunc, replaceFigMode=True, thetasSamplesClust=None, showConfInt=True,
# colorTitle=True, yLimUseData=False, adjustBottomHeight=0.25, orderClust=False):
assert len(clustProbBC.shape) == 2
nrOuterIt = 1
# clustProbBC = clustProbBC.reshape(1, clustProbBC.shape[0],
# clustProbBC.shape[1])
minHue = 0
maxHue = 0.66
minVal = np.min(biomkValuesThresh)
maxVal = np.max(biomkValuesThresh)
clustHuePoints = (biomkValuesThresh - minVal) / (maxVal - minVal)
clustHuePoints /= maxHue
outFile = pngFile
freesurfPath = getPaths(isCluster)
importMeshes(freesurfPath)
# for o in range(nrOuterIt):
colsB = getInterpColors(clustProbBC, plotTrajParams, clustHuePoints,
range(nrClust))
print(colsB.shape, colsB)
makeSnapshotBlender(outFile, colsB)
# print(asdsa)