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 a vtkgdcmReader
41 # -------------------------------------
43 new FileSelector openFileDialog
44 new GetInfoGdcmReader reader
45 connect openFileDialog.Out reader.In
48 # uncomment next lines to use Gimmick
49 # -----------------------------------
55 # uncomment next lines to Read a MHD file (and nothing else !)
56 # ------------------------------------------------------------
58 new FileSelector openFileDialog
59 set openFileDialog.Wildcard "(*.mhd)|*.mhd"
60 new MetaImageReader reader
61 connect openFileDialog.Out reader.In
64 # uncomment the following lines to read a 3D images stack
65 # (only if file name order is meaningfull)
66 # -------------------------------------------------------
68 // To choose the directory
69 new DirectorySelector ds
70 // To get the image names into a vector
71 new FilesFromDirectory fd
72 // To read all the files, as a bbitk::ImagePointer
73 new ImageSeriesReader reader
74 // user choosen directory as input
76 set fd.Recursive false
77 // list of files as input
78 #print "Files found in $ds.Out$\n
79 connect fd.Out reader.FileNames
82 # uncomment the following lines to read a 3D images stack
83 # (if the directory contains a 'XCoherent" Serie)
84 # -------------------------------------------------------
86 // To choose the directory
87 new DirectorySelector ds
88 // To get the image names into a vector
89 new FilesFromDirectory fd
90 // user choosen directory as input
92 // order the files, computes an accurate ZSpacing
93 new GetXCoherentInfoGdcmReader reader
94 connect fd.Out reader.In
97 # uncomment the following lines to read a 3D images stack
98 # (with DICOMDirReader)
99 # -------------------------------------------------------
101 include itk/boxes/bbDICOMDirReader
102 // To choose the directory
103 new DirectorySelector ds
104 new DICOMDirReader reader
105 connect ds.Out reader.In
109 //set reader.XSpacing 23.4
110 //set reader.YSpacing 23.4
111 //set reader.ZSpacing 35
113 #print "Image properties : $reader.Out"
117 new ImagePlanes planes
118 connect reader.Out planes.In
121 connect planes.PlaneX viewer.Obs1
122 connect planes.PlaneY viewer.Obs2
123 connect planes.PlaneZ viewer.Obs3
125 connect viewer.Widget main.Widget4
129 new Viewer2D viewerUL
130 set viewerUL.BoxProcessMode Always
131 connect planes.ImageX viewerUL.In
132 # contains only one slice
134 connect viewerUL.Widget upleft.Widget1
136 connect planes.BoxChange viewerUL.BoxExecute
138 print "===============planes.ImageX $planes.ImageX"
142 new Viewer2D viewerUR
143 set viewerUR.BoxProcessMode Always
144 connect planes.ImageY viewerUR.In
145 connect viewerUR.Widget upright.Widget1
146 # contains only one slice
148 connect planes.BoxChange viewerUR.BoxExecute
150 print "===============planes.ImageY $planes.ImageY"
154 new Viewer2D viewerDL
155 set viewerDL.BoxProcessMode Always
156 connect planes.ImageZ viewerDL.In
157 connect viewerDL.Widget downleft.Widget1
158 # contains only one slice
160 connect planes.BoxChange viewerDL.BoxExecute
162 print "===============planes.ImageZ $planes.ImageZ"
164 set main.WinTitle "demoViewing3"