]> Creatis software - creaMiniTools.git/blob - appli/template_creaPatientsSystem/scripts/00100_InsertDataA.bbs
58f7adb0d8c89326ae26bbb28775e264a28a0a18
[creaMiniTools.git] / appli / template_creaPatientsSystem / scripts / 00100_InsertDataA.bbs
1 # ----------------------------------
2 # - BBTKGEditor v 1.4 BBS BlackBox Script
3 # - /Users/davila/Creatis/C11/creatools_source/creaMiniTools/appli/template_creaPatientsSystem/scripts/00100_InsertDataA.bbs
4 # ----------------------------------
5
6 # BBTK GEditor Script
7 # ----------------------
8
9 include std
10 include itkvtk
11 include creaMaracasVisu
12 include wx
13 include creaVtk
14 include creaImageIO
15 include std
16 include vtk
17 include creaMiniTools
18
19 author "Author ??"
20 description "Description ??"
21 category "<VOID>"
22
23 new creaMaracasVisu:ViewerNV Box00
24
25 new wx:LayoutLine Box02
26
27 new creaVtk:OutputWindow Box03
28
29 new wx:LayoutSplit Box04
30   set Box04.Orientation "H"
31
32 new wx:CommandButton Box06
33   set Box06.Label "Read Camera  Image RGB (*.PNG)"
34
35 new creaImageIO:ReadImages Box07
36
37 new wx:FileSelector Box09
38
39 new wx:LayoutSplit Box11
40   set Box11.Proportion "90"
41   set Box11.WinTitle "00100_InsertDataA.bbg"
42
43 new wx:LayoutLine Box12
44   set Box12.Orientation "H"
45
46 new wx:InputText Box14
47   set Box14.In "Id_"
48   set Box14.ReactiveOnKeystroke "2"
49   set Box14.Title "Id"
50
51 new wx:CommandButton Box15
52   set Box15.Label "Save and Close"
53
54 new std:ConcatStrings Box16
55
56 new std:ConcatStrings Box17
57
58 new std:ReplaceCleanString Box18
59   set Box18.Replace "_"
60   set Box18.Search " "
61
62 new std:ConcatStrings Box19
63   set Box19.In2 "/image.mha"
64
65 new std:ConcatStrings Box21
66   set Box21.In1 "mkdir -p  "
67
68 new vtk:MetaImageWriter Box22
69   set Box22.Compression "true"
70
71 new vtk:vtkImageDataPointerRelay Box23
72
73 new std:ExecSystemCommand Box24
74
75 new std:ConcatStrings Box25
76   set Box25.In1 "/results/<CORE>/davila/00100_OriginalImages/Test_01/<PATIENT_ID>/Condition_01"
77
78 new std:ReplaceCleanString Box26
79   set Box26.Search "<PATIENT_ID>"
80
81 new wx:OutputText Box27
82   set Box27.Title "File Name"
83
84 new wx:LayoutLine Box28
85
86 new std:Exit Box29
87
88 new wx:ComboBox Box30
89   set Box30.In "Study_A  Study_B  Study_C"
90
91 new std:ReplaceCleanString Box31
92   set Box31.Search "<CORE>"
93
94 new std:MultipleInputs Box32
95
96 new std:MultipleInputs Box33
97
98 new wx:OutputText Box34
99
100 new wx:InputText Box35
101   set Box35.In "VOID"
102   set Box35.Title "Parameter01"
103
104 new std:GetVectorStringElement Box36
105   set Box36.ErrorValue "VOID"
106   set Box36.I "0"
107
108 new std:StringWriter Box37
109
110 new std:ConcatStrings Box38
111   set Box38.In1 "Parameter01"
112   set Box38.In2 "  "
113
114 new std:ConcatStrings Box40
115   set Box40.In2 "/Parameters.txt"
116
117 new std:MagicBox Box41
118
119 new creaMiniTools:WriteStatePatientSystem Box42
120   set Box42.State "Finish"
121
122 new std:ConcatStrings Box43
123   set Box43.In2 "/Step01_Insert_Data.txt"
124
125
126 connect Box00.Widget Box04.Widget2
127
128 connect Box02.Widget Box04.Widget1
129
130 connect Box06.Widget Box02.Widget1
131
132 connect Box09.Out Box07.LstNameImages
133
134 connect Box06.BoxChange Box09.BoxExecute
135
136 connect Box09.BoxChange Box07.BoxExecute
137
138 connect Box07.BoxChange Box00.BoxExecute
139
140 connect Box04.Widget Box11.Widget1
141
142
143 connect Box16.Out Box17.In1
144
145 connect Box14.Out Box18.In
146
147 connect Box17.Out Box19.In1
148
149 connect Box19.Out Box22.Filename
150
151 connect Box07.Out Box23.In
152
153 connect Box23.Out Box00.In
154
155 connect Box23.Out Box22.In
156
157 connect Box25.Out Box26.In
158
159 connect Box18.Out Box26.Replace
160
161 connect Box19.Out Box27.In
162
163 connect Box12.Widget Box28.Widget1
164
165 connect Box27.Widget Box28.Widget2
166
167 connect Box17.Out Box21.In2
168
169 connect Box21.Out Box24.In
170
171 connect Box28.Widget Box11.Widget2
172
173 connect Box15.Widget Box12.Widget6
174
175 connect Box30.Widget Box12.Widget1
176
177 connect Box14.Widget Box12.Widget3
178
179 connect Box30.OutString Box31.Replace
180
181 connect Box26.Out Box31.In
182
183 connect Box31.Out Box17.In2
184
185 connect Box30.BoxChange Box32.In1
186
187 connect Box14.BoxChange Box32.In2
188
189 connect Box32.BoxChange Box27.BoxExecute
190
191 connect Box15.BoxChange Box33.BoxExecute
192
193 connect Box24.BoxChange Box33.In1
194
195 connect Box22.BoxChange Box33.In3
196
197 connect Box34.Widget Box02.Widget3
198
199 connect Box09.Out Box34.In
200
201 connect Box09.BoxChange Box34.BoxExecute
202
203 connect Box35.Widget Box12.Widget2
204
205 connect Box35.Out Box36.In
206
207 connect Box38.Out Box37.In0
208
209 connect Box17.Out Box40.In1
210
211 connect Box37.BoxChange Box33.In2
212
213 connect Box40.Out Box37.FileName
214
215 connect Box36.Out Box38.In3
216
217
218 connect Box42.boxChange Box33.In4
219
220 connect Box29.BoxChange Box33.In9
221
222 connect Box17.Out Box43.In1
223
224 connect Box43.Out Box42.FileState
225
226 connect Box41.Out Box42.User
227
228
229
230 # Complex input ports
231 input ProjectDir Box16.In1 " "
232 input creaUser Box41.In " "
233 exec Box03
234 exec Box11