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 // =====================================
18 new LayoutLine upright
20 new LayoutLine downleft
22 connect upright.Widget main.Widget1
23 connect upleft.Widget main.Widget2
24 connect downleft.Widget main.Widget3
28 include vtk/boxes/bbLoadHola
31 # uncomment next lines to have a file selector
32 # --------------------------------------------
34 new FileSelector openFileDialog
35 new ImageReader reader
36 connect openFileDialog.Out reader.In
39 # uncomment next lines to use Gimmick
40 # -----------------------------------
46 # uncomment next lines to Read a MHD file (and nothing else !)
47 # ------------------------------------------------------------
49 new FileSelector openFileDialog
50 new MetaImageReader reader
51 connect openFileDialog.Out reader.In
54 # uncomment the following lines to read a 3D images stack
55 # (only if file name order is meaningfull)
56 # -------------------------------------------------------
58 // To choose the directory
59 new DirectorySelector ds
60 // To get the image names into a vector
61 new FilesFromDirectory fd
62 // To read all the files, as a bbitk::ImagePointer
63 new ImageSeriesReader reader
64 // user choosen directory as input
66 set fd.Recursive false
67 // list of files as imput
68 #print "Files found in $ds.Out$\n
69 connect fd.Out reader.FileNames
73 //set reader.XSpacing 23.4
74 //set reader.YSpacing 23.4
75 //set reader.ZSpacing 35
77 #print "Image properties : $reader.Out"
81 new ImagePlanes planes
82 connect reader.Out planes.In
85 connect planes.PlaneX viewer.Obs1
86 connect planes.PlaneY viewer.Obs2
87 connect planes.PlaneZ viewer.Obs3
89 connect viewer.Widget main.Widget4
94 set viewerUL.BoxProcessMode Always
95 connect planes.ImageX viewerUL.In
96 # contains only one slice
98 connect viewerUL.Widget upleft.Widget1
100 connect planes.BoxChange viewerUL.BoxExecute
102 print "===============planes.ImageX $planes.ImageX"
106 new Viewer2D viewerUR
107 set viewerUR.BoxProcessMode Always
108 connect planes.ImageY viewerUR.In
109 connect viewerUR.Widget upright.Widget1
110 # contains only one slice
112 connect planes.BoxChange viewerUR.BoxExecute
114 print "===============planes.ImageY $planes.ImageY"
118 new Viewer2D viewerDL
119 set viewerDL.BoxProcessMode Always
120 connect planes.ImageZ viewerDL.In
121 connect viewerDL.Widget downleft.Widget1
122 # contains only one slice
124 connect planes.BoxChange viewerDL.BoxExecute
126 print "===============planes.ImageZ $planes.ImageZ"
128 set main.WinTitle "demoViewing3"