1 description "3 slicers and a 3D view"
2 author "jpr@creatis.insa-lyon.fr"
5 // To show how easy it is to add smthing
6 // =====================================
19 new LayoutLine upright
21 new LayoutLine downleft
23 connect upright.Widget main.Widget1
24 connect upleft.Widget main.Widget2
25 connect downleft.Widget main.Widget3
29 include vtk/boxes/bbLoadHola
32 # uncomment next lines to have a file selector
33 # --------------------------------------------
35 new FileSelector openFileDialog
36 new ImageReader reader
37 connect openFileDialog.Out reader.In
40 # uncomment next lines to use Gimmick
41 # -----------------------------------
47 # uncomment next lines to Read a MHD file (and nothing else !)
48 # ------------------------------------------------------------
50 new FileSelector openFileDialog
51 new MetaImageReader reader
52 connect openFileDialog.Out reader.In
55 # uncomment the following lines to read a 3D images stack
56 # (only if file name order is meaningfull)
57 # -------------------------------------------------------
59 // To choose the directory
60 new DirectorySelector ds
61 // To get the image names into a vector
62 new FilesFromDirectory fd
63 // To read all the files, as a bbitk::ImagePointer
64 new ImageSeriesReader reader
65 // user choosen directory as input
67 set fd.Recursive false
68 // list of files as input
69 #print "Files found in $ds.Out$\n
70 connect fd.Out reader.FileNames
73 # uncomment the following lines to read a 3D images stack
74 # (if the directory contains a 'XCoherent" Serie)
75 # -------------------------------------------------------
77 // To choose the directory
78 new DirectorySelector ds
79 // To get the image names into a vector
80 new FilesFromDirectory fd
81 // user choosen directory as input
83 // order the files, computes an accurate ZSpacing
84 new GetXCoherentInfoGdcmReader reader
85 connect fd.Out reader.In
88 //set reader.XSpacing 23.4
89 //set reader.YSpacing 23.4
90 //set reader.ZSpacing 35
92 #print "Image properties : $reader.Out"
96 new ImagePlanes planes
97 connect reader.Out planes.In
100 connect planes.PlaneX viewer.Obs1
101 connect planes.PlaneY viewer.Obs2
102 connect planes.PlaneZ viewer.Obs3
104 connect viewer.Widget main.Widget4
108 new Viewer2D viewerUL
109 set viewerUL.BoxProcessMode Always
110 connect planes.ImageX viewerUL.In
111 # contains only one slice
113 connect viewerUL.Widget upleft.Widget1
115 connect planes.BoxChange viewerUL.BoxExecute
117 print "===============planes.ImageX $planes.ImageX"
121 new Viewer2D viewerUR
122 set viewerUR.BoxProcessMode Always
123 connect planes.ImageY viewerUR.In
124 connect viewerUR.Widget upright.Widget1
125 # contains only one slice
127 connect planes.BoxChange viewerUR.BoxExecute
129 print "===============planes.ImageY $planes.ImageY"
133 new Viewer2D viewerDL
134 set viewerDL.BoxProcessMode Always
135 connect planes.ImageZ viewerDL.In
136 connect viewerDL.Widget downleft.Widget1
137 # contains only one slice
139 connect planes.BoxChange viewerDL.BoxExecute
141 print "===============planes.ImageZ $planes.ImageZ"
143 set main.WinTitle "demoViewing3"