--- /dev/null
+
+
+description "3 slicers and a 3D view"
+author "jpr@creatis.insa-lyon.fr"
+category "demo"
+
+// To show how easy it is to add smthing
+
+
+load vtk
+include wxvtk
+load std
+load itk
+include vtk
+include wx
+load itkvtk
+
+//include wxvtk/boxes/bbSimpleSlicer
+//include wx/boxes/LayoutX4
+
+new LayoutX4 main
+new LayoutLine upright
+new LayoutLine upleft
+new LayoutLine downleft
+
+connect upright.Widget main.Widget1
+connect upleft.Widget main.Widget2
+connect downleft.Widget main.Widget3
+
+// Uncomment the following lines to be able to read a 3D images stack
+/* -----------------
+// To choose the directory
+new DirectorySelector ds
+// To get the image names into a vector
+new FilesFromDirectory fd
+// To read all the files, as a bbitk::ImagePointer
+new ImageSeriesReader reader
+
+connect ds.Out fd.In
+set fd.Recursive false
+print "Files found in $ds.Out$\n"
+print "-Not recursive----------------------------"
+//print " : $fd.Out$\n"
+
+set reader.XSpacing 23.4
+set reader.YSpacing 23.4
+set reader.ZSpacing 35
+
+connect fd.Out reader.FileNames
+*/
+
+
+
+// Comment out to following line if you want to be able to read a 3D images stack
+new LoadHola reader
+
+
+print "Image properties : $reader.Out"
+
+
+
+//For 3D Viewer
+
+new ImagePlanes planes
+ connect reader.Out planes.In
+
+new Viewer3D viewer
+ connect planes.PlaneX viewer.Obs1
+ connect planes.PlaneY viewer.Obs2
+ connect planes.PlaneZ viewer.Obs3
+
+ connect viewer.Widget main.Widget4
+
+
+// For X axis
+// ----------
+new Viewer2D viewerUL
+ set viewerUL.BoxProcessMode Always
+ connect planes.ImageX viewerUL.In
+ # contains only one slice
+ set viewerUL.Slice 0
+ connect viewerUL.Widget upleft.Widget1
+
+// print "planes.BoxChange $planes.BoxChange"
+// print "viewer.BoxChange $viewer.BoxChange"
+
+ connect planes.BoxChange viewerUL.BoxExecute
+
+print "===============planes.ImageX $planes.ImageX"
+
+// For Y axis
+// ----------
+new Viewer2D viewerUR
+ set viewerUR.BoxProcessMode Always
+ connect planes.ImageY viewerUR.In
+ connect viewerUR.Widget upright.Widget1
+ # contains only one slice
+ set viewerUR.Slice 0
+ connect planes.BoxChange viewerUR.BoxExecute
+
+ print "===============planes.ImageY $planes.ImageY"
+
+// For Z axis
+// ----------
+new Viewer2D viewerDL
+ set viewerDL.BoxProcessMode Always
+ connect planes.ImageZ viewerDL.In
+ connect viewerDL.Widget downleft.Widget1
+ # contains only one slice
+ set viewerDL.Slice 0
+ connect planes.BoxChange viewerDL.BoxExecute
+
+ print "===============planes.ImageZ $planes.ImageZ"
+
+set main.WinTitle "demoViewing3"
+
+exec main
+