description "A 3D image slicer" author "jpr@creatis.insa-lyon.fr" category "application" 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 load creaImageIO new Gimmick reader //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 "Slicer" exec main