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 // =====================================
20 new LayoutLine upright
22 new LayoutLine downleft
24 connect upright.Widget main.Widget1
25 connect upleft.Widget main.Widget2
26 connect downleft.Widget main.Widget3
30 include vtk/boxes/bbLoadHola
33 # uncomment next lines to have a file selector
34 # --------------------------------------------
36 new FileSelector openFileDialog
37 new ImageReader reader
38 connect openFileDialog.Out reader.In
41 # uncomment next lines to use Gimmick
42 # -----------------------------------
48 # uncomment next lines to Read a MHD file (and nothing else !)
49 # ------------------------------------------------------------
51 new FileSelector openFileDialog
52 set openFileDialog.Wildcard "(*.mhd)|*.mhd"
53 new MetaImageReader reader
54 connect openFileDialog.Out reader.In
57 # uncomment the following lines to read a 3D images stack
58 # (only if file name order is meaningfull)
59 # -------------------------------------------------------
61 // To choose the directory
62 new DirectorySelector ds
63 // To get the image names into a vector
64 new FilesFromDirectory fd
65 // To read all the files, as a bbitk::ImagePointer
66 new ImageSeriesReader reader
67 // user choosen directory as input
69 set fd.Recursive false
70 // list of files as input
71 #print "Files found in $ds.Out$\n
72 connect fd.Out reader.FileNames
75 # uncomment the following lines to read a 3D images stack
76 # (if the directory contains a 'XCoherent" Serie)
77 # -------------------------------------------------------
79 // To choose the directory
80 new DirectorySelector ds
81 // To get the image names into a vector
82 new FilesFromDirectory fd
83 // user choosen directory as input
85 // order the files, computes an accurate ZSpacing
86 new GetXCoherentInfoGdcmReader reader
87 connect fd.Out reader.In
90 # uncomment the following lines to read a 3D images stack
91 # (with DICOMDirReader)
92 # -------------------------------------------------------
94 include itk/boxes/bbDICOMDirReader
95 // To choose the directory
96 new DirectorySelector ds
97 new DICOMDirReader reader
98 connect ds.Out reader.In
102 //set reader.XSpacing 23.4
103 //set reader.YSpacing 23.4
104 //set reader.ZSpacing 35
106 #print "Image properties : $reader.Out"
110 new ImagePlanes planes
111 connect reader.Out planes.In
114 connect planes.PlaneX viewer.Obs1
115 connect planes.PlaneY viewer.Obs2
116 connect planes.PlaneZ viewer.Obs3
118 connect viewer.Widget main.Widget4
122 new Viewer2D viewerUL
123 set viewerUL.BoxProcessMode Always
124 connect planes.ImageX viewerUL.In
125 # contains only one slice
127 connect viewerUL.Widget upleft.Widget1
129 connect planes.BoxChange viewerUL.BoxExecute
131 print "===============planes.ImageX $planes.ImageX"
135 new Viewer2D viewerUR
136 set viewerUR.BoxProcessMode Always
137 connect planes.ImageY viewerUR.In
138 connect viewerUR.Widget upright.Widget1
139 # contains only one slice
141 connect planes.BoxChange viewerUR.BoxExecute
143 print "===============planes.ImageY $planes.ImageY"
147 new Viewer2D viewerDL
148 set viewerDL.BoxProcessMode Always
149 connect planes.ImageZ viewerDL.In
150 connect viewerDL.Widget downleft.Widget1
151 # contains only one slice
153 connect planes.BoxChange viewerDL.BoxExecute
155 print "===============planes.ImageZ $planes.ImageZ"
157 set main.WinTitle "demoViewing3"