1 # ----------------------------------
2 # - BBTKGEditor v 1.4 BBS BlackBox Script
3 # - /Users/davila/Creatis/C11/creatools_source/creaMiniTools/appli/template_creaPatientsSystem/scripts/00200_InitialParameters.bbs
4 # ----------------------------------
7 # ----------------------
15 include creaMaracasVisu
19 description "Description ??"
22 new std:ConcatStrings Box01
24 new std:ConcatStrings Box02
26 new wx:LayoutLine Box04
28 new creaVtk:OutputWindow Box05
30 new std:ConcatStrings Box06
31 set Box06.In1 "<CORE>/davila/00100_OriginalImages/Test_01/<PATIENT>/Condition_01"
33 new wx:OutputText Box07
35 new std:ReplaceCleanString Box08
36 set Box08.Search "<PATIENT>"
38 new std:ConcatStrings Box09
39 set Box09.In2 "/results/"
41 new std:ConcatStrings Box10
43 new std:ReplaceCleanString Box11
44 set Box11.Search "<CORE>"
46 new std:ConcatStrings Box12
47 set Box12.In2 "/image.mha"
49 new vtk:MetaImageReader Box13
51 new creaMaracasVisu:ViewerNV Box14
53 new wx:LayoutSplit Box15
54 set Box15.Orientation "H"
55 set Box15.WinTitle "00200_InitialParameters.bbg"
59 set Box16.ReactiveOnTrack "true"
60 set Box16.Title "Threshold"
62 new creaVtk:ImageThreshold Box17
63 set Box17.InValue "255"
64 set Box17.OutValue "0"
65 set Box17.Upper "10000"
67 new creaMaracasVisu:ColorLayerImageView Box18
68 set Box18.TypeControlsInterface "2"
70 new wx:CommandButton Box19
71 set Box19.Label "Save and Close"
73 new std:MultipleInputs Box20
77 new std:ConcatStrings Box23
78 set Box23.In2 "/InitialParameters.txt"
80 new std:StringWriter Box24
82 new std:ConcatStrings Box25
83 set Box25.In1 "Threshold "
85 new std:ReadColumnsString Box26
86 set Box26.Dimension "2"
88 new std:GetVectorStringElement Box27
89 set Box27.ErrorValue "100"
92 new std:ReplaceCleanString Box29
93 set Box29.Replace "00200_InitialParameters"
94 set Box29.Search "00100_OriginalImages"
96 new std:ConcatStrings Box30
97 set Box30.In1 "mkdir -p "
99 new std:ExecSystemCommand Box31
101 new creaMaracasVisu:ImageChangeInformation Box32
103 new vtk:ImageVtkProperties Box33
105 new std:GetVectorDoubleElement Box34
108 new creaMiniTools:WriteStatePatientSystem Box35
109 set Box35.State "Finish"
111 new std:ConcatStrings Box36
112 set Box36.In2 "/Step02_InitialParameters.txt"
114 new std:MagicBox Box37
119 connect Box06.Out Box08.In
121 connect Box02.Out Box08.Replace
123 connect Box01.Out Box09.In1
125 connect Box09.Out Box07.In
128 connect Box08.Out Box11.In
130 connect Box10.Out Box11.Replace
132 connect Box11.Out Box09.In3
134 connect Box09.Out Box12.In1
136 connect Box12.Out Box13.In
138 connect Box14.Widget Box15.Widget2
140 connect Box04.Widget Box15.Widget1
142 connect Box16.Out Box17.Lower
144 connect Box17.Out Box18.In
146 connect Box14.wxVtkBaseView2 Box18.WxVtkBaseView
148 connect Box14.wxVtkBaseView3 Box18.WxVtkBaseView1
150 connect Box14.wxVtkBaseView4 Box18.WxVtkBaseView2
152 connect Box16.BoxChange Box18.BoxExecute
154 connect Box19.Widget Box04.Widget9
156 connect Box19.BoxChange Box20.BoxExecute
158 connect Box07.Widget Box04.Widget2
160 connect Box18.Widget Box04.Widget4
162 connect Box16.Widget Box04.Widget6
164 connect Box23.Out Box24.FileName
166 connect Box16.Out Box25.In2
168 connect Box25.Out Box24.In0
170 connect Box24.BoxChange Box20.In2
172 connect Box23.Out Box26.FileName
174 connect Box26.lstData2 Box27.In
176 connect Box27.Out Box16.In
178 connect Box09.Out Box29.In
180 connect Box29.Out Box23.In1
182 connect Box29.Out Box30.In2
184 connect Box30.Out Box31.In
186 connect Box31.BoxChange Box20.In1
188 connect Box22.BoxChange Box20.In9
190 connect Box32.Out Box17.In
192 connect Box32.Out Box14.In
194 connect Box13.Out Box32.In
196 connect Box32.Out Box33.In
198 connect Box33.MinMax Box34.In
200 connect Box34.Out Box16.Max
202 connect Box35.boxChange Box20.In4
204 connect Box29.Out Box36.In1
207 connect Box37.Out Box35.User
209 connect Box36.Out Box35.Filename
213 # Complex input ports
214 input BaseDir Box01.In1 " "
215 input PatientID Box02.In1 " "
216 input CoreID Box10.In1 " "
217 input creaUser Box37.In " "