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 # Don't forget to comment out the following 2 lines
30 # If you want to check someting else.
32 include vtk/boxes/bbLoadHola
35 # uncomment next lines to have a file selector
36 # --------------------------------------------
38 new FileSelector openFileDialog
39 new ImageReader reader
40 connect openFileDialog.Out reader.In
43 # uncomment next lines to use a vtkgdcmReader
44 # -------------------------------------
46 new FileSelector openFileDialog
47 new GetInfoGdcmReader reader
48 connect openFileDialog.Out reader.In
51 # uncomment next lines to use Gimmick
52 # -----------------------------------
58 # uncomment next lines to Read a MHD file (and nothing else !)
59 # ------------------------------------------------------------
61 new FileSelector openFileDialog
62 set openFileDialog.Wildcard "(*.mhd)|*.mhd"
63 new MetaImageReader reader
64 connect openFileDialog.Out reader.In
67 # uncomment the following lines to read a 3D images stack
68 # (only if file name order is meaningfull)
69 # -------------------------------------------------------
71 // To choose the directory
72 new DirectorySelector ds
73 // To get the image names into a vector
74 new FilesFromDirectory fd
75 // To read all the files, as a bbitk::ImagePointer
76 new ImageSeriesReader reader
77 // user choosen directory as input
79 set fd.Recursive false
80 // list of files as input
81 #print "Files found in $ds.Out$\n
82 connect fd.Out reader.FileNames
85 # uncomment the following lines to read a 3D images stack
86 # (if the directory contains a 'XCoherent" Serie)
87 # -------------------------------------------------------
89 // To choose the directory
90 new DirectorySelector ds
91 // To get the image names into a vector
92 new FilesFromDirectory fd
93 // user choosen directory as input
95 // order the files, computes an accurate ZSpacing
96 new GetXCoherentInfoGdcmReader reader
97 connect fd.Out reader.In
100 # uncomment the following lines to read a 3D images stack
101 # (with DICOMDirReader)
102 # -------------------------------------------------------
104 include itk/boxes/bbDICOMDirReader
105 // To choose the directory
106 new DirectorySelector ds
107 new DICOMDirReader reader
108 connect ds.Out reader.In
112 //set reader.XSpacing 23.4
113 //set reader.YSpacing 23.4
114 //set reader.ZSpacing 35
116 #print "Image properties : $reader.Out"
120 new ImagePlanes planes
121 connect reader.Out planes.In
124 connect planes.PlaneX viewer.Obs1
125 connect planes.PlaneY viewer.Obs2
126 connect planes.PlaneZ viewer.Obs3
128 connect viewer.Widget main.Widget4
132 new Viewer2D viewerUL
133 set viewerUL.BoxProcessMode Always
134 connect planes.ImageX viewerUL.In
135 # contains only one slice
137 connect viewerUL.Widget upleft.Widget1
139 connect planes.BoxChange viewerUL.BoxExecute
141 print "===============planes.ImageX $planes.ImageX"
145 new Viewer2D viewerUR
146 set viewerUR.BoxProcessMode Always
147 connect planes.ImageY viewerUR.In
148 connect viewerUR.Widget upright.Widget1
149 # contains only one slice
151 connect planes.BoxChange viewerUR.BoxExecute
153 print "===============planes.ImageY $planes.ImageY"
157 new Viewer2D viewerDL
158 set viewerDL.BoxProcessMode Always
159 connect planes.ImageZ viewerDL.In
160 connect viewerDL.Widget downleft.Widget1
161 # contains only one slice
163 connect planes.BoxChange viewerDL.BoxExecute
165 print "===============planes.ImageZ $planes.ImageZ"
167 set main.WinTitle "demoViewing3"