]> Creatis software - creaRigidRegistration.git/blob - PackRecalage/bbs/boxes/CompareImagesWidget.bbs
b5e5db10f25b4321ebb04eb3ed7e873f5f0df309
[creaRigidRegistration.git] / PackRecalage / bbs / boxes / CompareImagesWidget.bbs
1 # ---------------------------------------------------------------------
2 #
3 # Copyright (c) CREATIS (Centre de Recherche en Acquisition et Traitement de l'Image 
4 #                        pour la Santé)
5 # Authors : Eduardo Davila, Frederic Cervenansky, Claire Mouton
6 #
7 #  This software is governed by the CeCILL-B license under French law and 
8 #  abiding by the rules of distribution of free software. You can  use, 
9 #  modify and/ or redistribute the software under the terms of the CeCILL-B 
10 #  license as circulated by CEA, CNRS and INRIA at the following URL 
11 #  http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html 
12 #  or in the file LICENSE.txt.
13 #
14 #  As a counterpart to the access to the source code and  rights to copy,
15 #  modify and redistribute granted by the license, users are provided only
16 #  with a limited warranty  and the software's author,  the holder of the
17 #  economic rights,  and the successive licensors  have only  limited
18 #  liability. 
19 #
20 #  The fact that you are presently reading this means that you have had
21 #  knowledge of the CeCILL-B license and that you accept its terms.
22 # ------------------------------------------------------------------------   
23
24 # ----------------------------------
25 # - BBTKGEditor v 1.2 BBS BlackBox Script (Complex Box)
26 # - /Users/davila/Creatis/All5/creatools_source/creaRigidRegistration/PackRecalage/bbs/boxes/CompareImagesWidget.bbs
27 # ----------------------------------
28
29 include std
30 include itkvtk
31 include vtk
32 include wx
33 include PackRecalage
34 include std
35 include creaMaracasVisu
36
37 define CompareImagesWidget PackRecalage
38
39 author "info-dev@creatis.insa-lyon.fr"
40 description "creatisRecalage"
41
42 category "example"
43
44 new SliceImage imgslice1
45
46 new SliceImage imgslice2
47
48 new LayoutLine buttonsLayout
49   set buttonsLayout.Orientation "V"
50   set buttonsLayout.WinTitle "Image transformation"
51
52 new Slider slider
53   set slider.In "0"
54   set slider.Max "180"
55   set slider.Min "-180"
56   set slider.ReactiveOnTrack "1"
57   set slider.Title "Angle"
58
59 new Slider sliderX
60   set sliderX.In "100"
61   set sliderX.Max "500"
62   set sliderX.Min "10"
63   set sliderX.ReactiveOnTrack "1"
64   set sliderX.Title "% Scale in X"
65
66 new Slider sliderY
67   set sliderY.In "100"
68   set sliderY.Max "500"
69   set sliderY.Min "10"
70   set sliderY.ReactiveOnTrack "1"
71   set sliderY.Title "% Scale in Y"
72
73 new Transform2DBox transform
74
75 new ReSlicerBox reslice1
76   set reslice1.Centered false
77   set reslice1.Interpolate true
78   set reslice1.Origin "0 0 0"
79
80 new ImageConvolution convol1
81
82 new ImageConvolution convol2
83
84 new ImageRecalageProperties properties
85
86 new Slider sdrZ
87   set sdrZ.Min "0"
88   set sdrZ.ReactiveOnTrack "1"
89   set sdrZ.Title "Z for slice"
90
91 new Slider sdrF
92   set sdrF.In "0"
93   set sdrF.Max "100"
94   set sdrF.Min "0"
95   set sdrF.ReactiveOnTrack "1"
96   set sdrF.Title "Convolution Factor"
97
98 new CheckBox checkF
99   set checkF.In "True"
100
101 new MultipleInputs multF
102
103 new Slider colorLevel
104   set colorLevel.Min "0"
105   set colorLevel.ReactiveOnTrack "true"
106   set colorLevel.Title "Color Level"
107
108 new Slider windowLevel
109   set windowLevel.Min "0"
110   set windowLevel.ReactiveOnTrack "true"
111   set windowLevel.Title "Window Level"
112
113 new MultipleInputs multLevels
114
115 new CheckBoardBox cbb
116
117 new Slider sdr
118   set sdr.In "14"
119   set sdr.Max "50"
120   set sdr.ReactiveOnTrack "1"
121
122 new Slider sdr2
123   set sdr2.In "14"
124   set sdr2.Max "50"
125   set sdr2.ReactiveOnTrack "1"
126
127 new LayoutSplit checkerBoard
128   set checkerBoard.Proportion "80"
129
130 new LayoutLine ly
131
132 new ViewerNV viewerCH
133   set viewerCH.nTypeView "0"
134
135 new TransparencyBox trans
136
137 new Slider sdrP
138   set sdrP.In "50"
139   set sdrP.Max "100"
140   set sdrP.Min "0"
141   set sdrP.ReactiveOnTrack "true"
142
143 new ViewerNV transView
144   set transView.nTypeView "0"
145
146 new LayoutSplit transparency
147   set transparency.Proportion "80"
148
149 new ImageSwitcherBox switch
150
151 new CheckBox checkS
152   set checkS.In "true"
153   set checkS.Title "On"
154
155 new Slider sdrT
156   set sdrT.In "500"
157   set sdrT.Max "1000"
158   set sdrT.Min "0"
159   set sdrT.ReactiveOnTrack "True"
160
161 new LayoutSplit switchWindow
162   set switchWindow.Proportion "80"
163
164 new MultipleInputs mult
165
166 new MultipleInputs mult2
167
168 new MultipleInputs mult3
169
170 new MultipleInputs mult4
171
172 new LayoutTab tabs
173   set tabs.Orientation V
174
175 new LayoutLine tools
176   set tools.WinTitle "Appearance"
177
178 new LayoutSplit convolTools
179   set convolTools.Orientation "H"
180   set convolTools.Proportion "80"
181
182 new LayoutSplit window2
183   set window2.Orientation H
184   set window2.Proportion "25"
185
186 new vtkImageDataPointerRelay Box56
187
188 new vtkImageDataPointerRelay Box59
189
190 new LayoutTab Box61
191
192 new LayoutLine Box47
193   set Box47.Orientation H
194
195 new LayoutLine Box48
196
197 new ViewerNV Box49
198   set Box49.nTypeView 0
199
200 new ImageVtkProperties Box51
201
202 new VectorRescaleSlope Box52
203   set Box52.A 0.5
204   set Box52.B 0
205   set Box52.Type 0
206
207 new ConcatStrings Box53
208
209 new ConcatStrings Box54
210
211 new Slider Box55
212   set Box55.In 0
213   set Box55.Label true
214   set Box55.Max 200
215   set Box55.Min -200
216   set Box55.ReactiveOnTrack true
217   set Box55.Title "Translate Y"
218
219 new Slider Box57
220   set Box57.In 0
221   set Box57.Label true
222   set Box57.Max 200
223   set Box57.Min -200
224   set Box57.ReactiveOnTrack true
225   set Box57.Title "translate X"
226
227 new ConcatStrings Box58
228   set Box58.In2 " "
229   set Box58.In4 " 0"
230
231 new GetVectorIntElement Box60
232   set Box60.I 0
233
234 new Add Box62
235
236 new Add Box63
237
238 new GetVectorIntElement Box64
239   set Box64.I 1
240
241 new ViewerNV Box65
242   set Box65.nTypeView 0
243
244 new ViewerNV Box66
245   set Box66.nTypeView 0
246
247 new LayoutLine Box67
248   set Box67.Orientation H
249   set Box67.WinTitle "Parallel"
250
251 new MultipleInputs Box68
252
253
254 connect slider.Widget buttonsLayout.Widget1
255 connect sliderX.Widget buttonsLayout.Widget2
256 connect sliderY.Widget buttonsLayout.Widget3
257 connect slider.Out transform.Angle
258 connect sliderX.Out transform.ScaleX
259 connect sliderY.Out transform.ScaleY
260 connect transform.Out reslice1.Transform
261 connect imgslice2.Out reslice1.In
262 connect imgslice1.Out convol1.In
263 connect properties.LengthZ sdrZ.Max
264 connect sdrZ.Out imgslice1.Z
265 connect sdrZ.Out imgslice2.Z
266 connect sdrZ.BoxChange imgslice1.BoxExecute
267 connect sdrZ.BoxChange imgslice2.BoxExecute
268 connect sdrF.Out convol1.Factor
269 connect sdrF.Out convol2.Factor
270 connect checkF.Out convol1.On
271 connect checkF.Out convol2.On
272 connect sdrF.BoxChange multF.In1
273 connect checkF.BoxChange multF.In2
274 connect multF.BoxChange convol1.BoxExecute
275 connect multF.BoxChange convol2.BoxExecute
276 connect properties.ColorLevel colorLevel.Max
277 connect properties.MidColorLevel colorLevel.In
278 connect properties.ColorLevel windowLevel.Max
279 connect properties.MidColorLevel windowLevel.In
280 connect colorLevel.BoxChange multLevels.In1
281 connect windowLevel.BoxChange multLevels.In2
282 connect convol1.Out cbb.In1
283 connect convol2.Out cbb.In2
284 connect colorLevel.Out viewerCH.ColorLevel
285 connect windowLevel.Out viewerCH.WindowLevel
286 connect sdr.Out cbb.Cols
287 connect sdr2.Out cbb.Rows
288 connect cbb.Out viewerCH.In
289 connect sdr.Widget ly.Widget2
290 connect sdr2.Widget ly.Widget3
291 connect viewerCH.Widget checkerBoard.Widget1
292 connect ly.Widget checkerBoard.Widget2
293 connect convol1.Out trans.In1
294 connect convol2.Out trans.In2
295 connect sdrP.Out trans.Percent
296 connect transView.Widget transparency.Widget1
297 connect sdrP.Widget transparency.Widget2
298 connect windowLevel.Out transView.WindowLevel
299 connect convol1.Out switch.In1
300 connect convol2.Out switch.In2
301 connect checkS.Out switch.On
302 connect sdrT.Out switch.Time
303 connect sdrT.BoxChange switch.BoxExecute
304 connect slider.BoxChange mult.In1
305 connect sliderX.BoxChange mult.In2
306 connect sliderY.BoxChange mult.In3
307 connect multF.BoxChange mult2.In1
308 connect mult.BoxChange mult2.In2
309 connect ly.BoxChange mult3.In1
310 connect mult2.BoxChange mult3.In2
311 connect imgslice1.BoxChange mult3.In3
312 connect imgslice2.BoxChange mult3.In4
313 connect multLevels.BoxChange mult3.In5
314 connect mult3.BoxChange cbb.BoxExecute
315 connect cbb.BoxChange viewerCH.BoxExecute
316 connect mult2.BoxChange mult4.In1
317 connect sdrP.BoxChange mult4.In2
318 connect mult4.BoxChange trans.BoxExecute
319 connect trans.BoxChange transView.BoxExecute
320 connect colorLevel.Widget tools.Widget2
321 connect windowLevel.Widget tools.Widget3
322 connect checkF.Widget convolTools.Widget2
323 connect convolTools.Widget tools.Widget4
324 connect Box56.Out imgslice2.In
325 connect Box59.Out imgslice1.In
326 connect Box59.Out properties.In
327 connect sdrF.Widget convolTools.Widget1
328 connect sdrZ.Widget tools.Widget1
329 connect transparency.Widget tabs.Widget2
330 connect checkS.Widget Box47.Widget2
331 connect switch.Widget Box47.Widget1
332 connect sdrT.Widget Box48.Widget2
333 connect Box47.Widget Box48.Widget1
334 connect Box48.Widget switchWindow.Widget2
335 connect switchWindow.Widget tabs.Widget1
336 connect checkerBoard.Widget tabs.Widget3
337 connect reslice1.Out convol2.In
338 connect trans.Out transView.In
339 connect Box49.Widget switchWindow.Widget1
340 connect switch.Out Box49.In
341 connect switch.BoxChange Box49.BoxExecute
342 connect imgslice2.Out Box51.In
343 connect Box51.Size Box53.In1
344 connect Box53.Out Box52.In
345 connect Box52.Out Box54.In1
346 connect Box60.Out Box62.In1
347 connect Box57.Out Box62.In2
348 connect Box62.Out Box58.In1
349 connect Box64.Out Box63.In1
350 connect Box55.Out Box63.In2
351 connect Box63.Out Box58.In3
352 connect Box57.Widget buttonsLayout.Widget4
353 connect Box55.Widget buttonsLayout.Widget5
354 connect Box57.BoxChange mult.In4
355 connect Box55.BoxChange mult.In5
356 connect Box58.Out transform.CenterPoint
357 connect Box54.Out reslice1.Origin
358 connect Box54.Out Box64.In
359 connect Box54.Out Box60.In
360 connect Box61.Widget window2.Widget1
361 connect tabs.Widget window2.Widget2
362 connect tools.Widget Box61.Widget1
363 connect buttonsLayout.Widget Box61.Widget2
364 connect Box66.Widget Box67.Widget2
365 connect Box65.Widget Box67.Widget1
366 connect Box67.Widget tabs.Widget4
367 connect convol1.Out Box66.In
368 connect convol2.Out Box65.In
369 connect mult3.BoxChange Box68.In1
370 connect Box68.BoxChange Box66.BoxExecute
371 connect Box68.BoxChange Box65.BoxExecute
372 connect mult4.BoxChange Box68.In2
373
374
375 # Complex input ports
376 input In2 Box59.In " "
377 input In1 Box56.In " "
378 input WinTitle window2.WinTitle " "
379
380 # Complex output ports
381 output Widget window2.Widget " "
382
383 endefine