]> Creatis software - bbtk.git/blob - packages/wxvtk/bbs/appli/exampleSynchro2ImagesSlicerMHD.bbs
#3107 BBTK Bug New Normal - branch vtk7itk4 compilation with vtk7
[bbtk.git] / packages / wxvtk / bbs / appli / exampleSynchro2ImagesSlicerMHD.bbs
1 # ----------------------------------
2 # - BBTKGEditor v 1.4 BBS BlackBox Script
3 # - /tmpEED/creaTools2/creatools_source/bbtk/packages/wxvtk/bbs/appli/exampleSynchro2ImagesSlicerMHD.bbs
4 # ----------------------------------
5
6 # BBTK GEditor Script
7 # ----------------------
8
9 include std
10 include itkvtk
11 include wx
12 include vtk
13 include wxvtk
14 include itk
15 include std
16
17 author "maciej.orkisz at creatis.Insa-lyon.fr"
18 description "elementary 3D image synchronization tool"
19 category "application image viewer"
20
21 new wx:FileSelector fileDialog1
22   set fileDialog1.DefaultDir "."
23   set fileDialog1.Message "Select the first (left) MHD image file"
24
25 new vtk:MetaImageReader reader1
26
27 new wx:FileSelector fileDialog2
28   set fileDialog2.DefaultDir "."
29   set fileDialog2.Message "Select the second (right) MHD image file"
30
31 new vtk:MetaImageReader reader2
32
33 new wxvtk:Viewer2D viewer1
34
35 new wxvtk:Viewer2D viewer2
36
37 new wx:Slider slider
38   set slider.ReactiveOnTrack "1"
39   set slider.Title "Slice number"
40
41 new wx:LayoutSplit layout
42   set layout.Proportion "10"
43
44 new wx:LayoutLine layout_line
45   set layout_line.Orientation "H"
46
47 new itk:ImageProperties imProperties
48
49 new std:GetVectorIntElement imSize
50   set imSize.I "2"
51
52 new std:Add add
53   set add.In1 "-1"
54
55
56 connect fileDialog1.Out reader1.In
57
58 connect reader1.Out viewer1.In
59
60 connect slider.Out viewer1.Slice
61
62 connect slider.BoxChange viewer1.BoxExecute
63
64 connect fileDialog2.Out reader2.In
65
66 connect reader2.Out viewer2.In
67
68 connect slider.Out viewer2.Slice
69
70 connect slider.BoxChange viewer2.BoxExecute
71
72 connect slider.Widget layout.Widget1
73
74 connect layout_line.Widget layout.Widget2
75
76 connect viewer1.Widget layout_line.Widget1
77
78 connect viewer2.Widget layout_line.Widget2
79
80 connect reader1.Out imProperties.In
81
82 connect imProperties.Size imSize.In
83
84 connect imSize.Out add.In2
85
86 connect add.Out slider.Max
87
88
89
90 # Complex input ports
91 exec layout