// To show how easy it is to add smthing
// =====================================
-load wxvtk
-include wx
load vtk
+include wxvtk
load std
-load itkvtk
load itk
+include vtk
+include wx
+load itkvtk
+
include wxvtk/boxes/bbSimpleSlicer
new LayoutX4 main
new LayoutLine upright
new LayoutLine upleft
-new LayoutLine down
+new LayoutLine downleft
-connect upright.Widget main.Widget1
-connect upleft.Widget main.Widget2
-connect down.Widget main.Widget3
+connect upright.Widget main.Widget1
+connect upleft.Widget main.Widget2
+connect downleft.Widget main.Widget3
# Here loads hola.mhd
# -------------------
#new FilesFromDirectory fd
// To read all the files, as a bbitk::ImagePointer
#new ImageSeriesReader reader
+// user choosen directory as input
+#connect ds.Out fd.In
+#set fd.Recursive false
+// list of files as imput
+#connect fd.Out reader.FileNames
+
-#print "Image properties : $reader.Out"
-
#Get image dimensions, ...
new ImageProperties mc
connect reader.Out mc.In
// For Z axis
new SimpleSlicer viewerTD
connect reader.Out viewerTD.In
- connect viewerTD.Widget down.Widget1
+ connect viewerTD.Widget downleft.Widget1
#initial slice is the middle one
connect div2.Out viewerTD.Slice
#Slider size is the number of planes
-
-
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
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 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
-
+# Here loads hola.mhd
+# -------------------
+#include vtk/boxes/bbLoadHola
+#new LoadHola reader
+
+# uncomment next lines to have a file selector
+# --------------------------------------------
+#new FileSelector openFileDialog
+#new ImageReader reader
+# connect openFileDialog.Out reader.In
+
+# uncomment next lines to use Gimmick
+# -----------------------------------
+#load creaImageIO
+#new Gimmick reader
+
+# uncomment next lines to Read a MHD file (and nothing else !)
+# ------------------------------------------------------------
+#new FileSelector openFileDialog
+#new MetaImageReader reader
+# connect openFileDialog.Out reader.In
+
+# uncomment the following lines to read a 3D images stack
+# -------------------------------------------------------
// To choose the directory
-new DirectorySelector ds
+#new DirectorySelector ds
// To get the image names into a vector
-new FilesFromDirectory fd
+#new FilesFromDirectory fd
// To read all the files, as a bbitk::ImagePointer
-new ImageSeriesReader reader
-
+#new ImageSeriesReader reader
connect ds.Out fd.In
set fd.Recursive false
print "Files found in $ds.Out$\n"
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"
+//print "Image properties : $reader.Out"
//For 3D Viewer
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"
print "===============planes.ImageZ $planes.ImageZ"
set main.WinTitle "demoViewing3"
-
exec main