-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path9_reextractmodelbinary_batch.hx
120 lines (98 loc) · 4.66 KB
/
9_reextractmodelbinary_batch.hx
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
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
remove -all
#### mask image, extract subvolume, and convert to binary by Hannah Menke on 20 April 2015. Email: [email protected]
#### USER INPUT set first and last scan numbers that you would like segmented
set first {2}
set last {54}
#### END USER INPUT
set loopno "$first"
for {set loopno "$first"} {$first <= $last} {incr loopno} {
echo $loopno
echo $last
#### USER INPUT set input directory and directory of avizo script objects
[ load D:/hannah/est0.5/segmasked/segmasked_$loopno.am ] setLabel "new"
set hideNewModules 0
create HxLatticeAccess "Extract Subvolume"
"Extract Subvolume" setIconPosition 245 268
"Extract Subvolume" setVar "CustomHelp" {HxLatticeAccess}
"Extract Subvolume" data connect "new"
"Extract Subvolume" time disconnect
"Extract Subvolume" time setMinMax 0 1
"Extract Subvolume" time setSubMinMax 0 1
"Extract Subvolume" time setValue 0
"Extract Subvolume" time setDiscrete 0
"Extract Subvolume" time setIncrement 0.01
"Extract Subvolume" time animationMode -once
"Extract Subvolume" fire
"Extract Subvolume" dataset setIndex 0 0
"Extract Subvolume" boxUnits setValue 0
"Extract Subvolume" boxMin setMinMax 0 -3.40282346638529e+038 3.40282346638529e+038
"Extract Subvolume" boxMin setValue 0 0
"Extract Subvolume" boxMin setMinMax 1 -3.40282346638529e+038 3.40282346638529e+038
"Extract Subvolume" boxMin setValue 1 0
"Extract Subvolume" boxMin setMinMax 2 -3.40282346638529e+038 3.40282346638529e+038
"Extract Subvolume" boxMin setValue 2 100
"Extract Subvolume" boxSize setMinMax 0 -3.40282346638529e+038 3.40282346638529e+038
"Extract Subvolume" boxSize setValue 0 747
"Extract Subvolume" boxSize setMinMax 1 -3.40282346638529e+038 3.40282346638529e+038
"Extract Subvolume" boxSize setValue 1 750
"Extract Subvolume" boxSize setMinMax 2 -3.40282346638529e+038 3.40282346638529e+038
"Extract Subvolume" boxSize setValue 2 800
"Extract Subvolume" options setValue 0 0
"Extract Subvolume" options setToggleVisible 0 1
"Extract Subvolume" options setValue 1 0
"Extract Subvolume" options setToggleVisible 1 1
"Extract Subvolume" options setValue 2 1
"Extract Subvolume" options setToggleVisible 2 0
"Extract Subvolume" subsample setMinMax 0 -16777216 16777216
"Extract Subvolume" subsample setValue 0 4
"Extract Subvolume" subsample setMinMax 1 -16777216 16777216
"Extract Subvolume" subsample setValue 1 4
"Extract Subvolume" subsample setMinMax 2 -16777216 16777216
"Extract Subvolume" subsample setValue 2 4
"Extract Subvolume" timeSlider setMinMax 0 0
"Extract Subvolume" timeSlider setButtons 1
"Extract Subvolume" timeSlider setEditButton 1
"Extract Subvolume" timeSlider setIncrement 1
"Extract Subvolume" timeSlider setValue 0
"Extract Subvolume" timeSlider setSubMinMax 0 0
"Extract Subvolume" applyTransformToResult 1
"Extract Subvolume" fire
"Extract Subvolume" setViewerMask 49151
"Extract Subvolume" setPickable 1
set hideNewModules 0
[ "Extract Subvolume" create ] setLabel "modelextracted"
set hideNewModules 0
create HxCastField "Convert Image Type"
"Convert Image Type" setIconPosition 168 190
"Convert Image Type" setVar "CustomHelp" {HxCastField}
"Convert Image Type" data connect "modelextracted"
"Convert Image Type" colormap setDefaultColor 1 0.8 0.5
"Convert Image Type" colormap setDefaultAlpha 0.500000
"Convert Image Type" colormap setLocalRange 1
"Convert Image Type" colormap setLocalMinMax 1.000000 8.000000
"Convert Image Type" colormap enableAlpha 1
"Convert Image Type" colormap enableAlphaToggle 1
"Convert Image Type" colormap setAutoAdjustRangeMode 1
"Convert Image Type" colormap setColorbarMinMax 1 8
"Convert Image Type" colormap connect "labels.am"
"Convert Image Type" fire
"Convert Image Type" outputType setIndex 0 0
"Convert Image Type" scaling setMinMax 0 -3.40282346638529e+038 3.40282346638529e+038
"Convert Image Type" scaling setValue 0 1
"Convert Image Type" scaling setMinMax 1 -3.40282346638529e+038 3.40282346638529e+038
"Convert Image Type" scaling setValue 1 0
"Convert Image Type" voxelGridOptions setValue 0 1
"Convert Image Type" voxelGridOptions setToggleVisible 0 1
"Convert Image Type" colorFieldOptions setIndex 0 0
"Convert Image Type" applyTransformToResult 1
"Convert Image Type" fire
"Convert Image Type" setViewerMask 49151
"Convert Image Type" setPickable 1
set hideNewModules 0
[ "Convert Image Type" create
] setLabel "model8bit"
model8bit save "Raw Data 3D" D:/hannah/est0.5/newmodelbinary/$loopno.raw
remove "Arithmetic2" "Arithmetic3" "segphase_$loopno.am" "segdiffsub_$loopno.am" "new" "old" "newold" "$loopno.am" "segmasked_$loopno.am" "modelextracted" "newmasked" "model8bit"
set loopno2 [expr $loopno2+1]
}
remove -all