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