--- /dev/null
+description "Simple OrthoSlicer : Little Demo of the box <a href=#Viewer2D>Viewer2D</a>."
+author "info-dev@creatis.insa-lyon.fr"
+category "demo"
+
+#Should probabely moved to 'Applications'
+
+// Simple OrthoSlicer for 3D Files (i.e.: not an image stack)
+
+load wxvtk
+include wx
+load vtk
+load std
+load itkvtk
+load itk
+include wxvtk/boxes/bbSimpleSlicer
+
+new LayoutTDown main
+new LayoutLine upright
+new LayoutLine upleft
+new LayoutLine down
+
+connect upright.Widget main.Widget1
+connect upleft.Widget main.Widget2
+connect down.Widget main.Widget3
+
+new FileSelector openFileDialog
+
+new ImageReader reader
+ connect openFileDialog.Out reader.In
+
+#Get image dimensions, ...
+new ImageProperties mc
+ connect reader.Out mc.In
+
+#Get number of column (X)
+new GetVectorIntElement gveX
+ connect mc.Size gveX.In
+ set gveX.I 0
+
+#Get number of rows (Y)
+new GetVectorIntElement gveY
+ connect mc.Size gveY.In
+ set gveY.I 1
+
+#Get number of planes (Z)
+new GetVectorIntElement gveZ
+ connect mc.Size gveZ.In
+ set gveZ.I 2
+
+#Compute the number of the 'middle' slice on X axis
+new Div div0
+ connect gveX.Out div0.In1
+ set div0.In2 2
+
+#Compute the number of the 'middle' slice on Y axis
+new Div div1
+ connect gveY.Out div1.In1
+ set div1.In2 2
+
+#Compute the number of the 'middle' slice on Z axis
+new Div div2
+ connect gveZ.Out div2.In1
+ set div2.In2 2
+
+
+// For X axis
+new SimpleSlicer viewerUL
+ connect reader.Out viewerUL.In
+ connect viewerUL.Widget upleft.Widget1
+ #initial slice is the middle one
+ connect div0.Out viewerUL.Slice
+ #Slider size is the number of planes
+ connect gveX.Out viewerUL.SliderSize
+ set viewerUL.SliderReactiveOnTrack 1
+ set viewerUL.Orientation 0
+ set viewerUL.SliderOrientation H
+ set viewerUL.SliderTitle "Planes YZ"
+
+
+// For Y axis
+new SimpleSlicer viewerUR
+ connect reader.Out viewerUR.In
+ connect viewerUR.Widget upright.Widget1
+ #initial slice is the middle one
+ connect div1.Out viewerUR.Slice
+ #Slider size is the number of planes
+ connect gveY.Out viewerUR.SliderSize
+ set viewerUR.SliderReactiveOnTrack 1
+ set viewerUR.SliderOrientation H
+ set viewerUR.Orientation 1
+ set viewerUR.SliderTitle "Planes XZ"
+
+// For Z axis
+new SimpleSlicer viewerTD
+ connect reader.Out viewerTD.In
+ connect viewerTD.Widget down.Widget1
+ #initial slice is the middle one
+ connect div2.Out viewerTD.Slice
+ #Slider size is the number of planes
+ connect gveZ.Out viewerTD.SliderSize
+ set viewerTD.SliderReactiveOnTrack 1
+ set viewerTD.SliderOrientation H
+ set viewerTD.Orientation 2
+ set viewerTD.SliderTitle "Planes XY"
+
+exec main
+exec viewerTD
+
+
--- /dev/null
+description "Interactive Segmenting of hair X-Ray images"
+author "info-dev at creatis.insa-lyon.fr"
+category "demo"
+
+// 3 Slices, 2 volumes
+
+include std
+include vtk
+include wx
+include itk
+include itkvtk
+include wxvtk
+
+new FileSelector openFileDialog
+
+new ImageReader reader
+ connect openFileDialog.Out reader.In
+
+#Get image dimensions, ...
+new ImageProperties mc
+ connect reader.Out mc.In
+
+#Get number of planes (Z)
+new GetVectorIntElement gveZ
+ connect mc.Size gveZ.In
+ set gveZ.I 2
+
+#Compute the number of the 'middle' slice on Z axis
+new Div div2
+ connect gveZ.Out div2.In1
+ set div2.In2 2
+
+#---------------------------------------------------------------------
+
+new Slider slider
+ set slider.Title "Slice"
+
+ #Slider size is the number of planes
+ connect gveZ.Out slider.Max
+ #initial slice is the middle one
+ connect div2.Out slider.In
+ set slider.ChangeResolution 1
+
+new Slider lowerThresholdSlider
+ set lowerThresholdSlider.Title "LowerThreshold"
+ set lowerThresholdSlider.Max 50
+ set lowerThresholdSlider.In 20
+ set lowerThresholdSlider.ChangeResolution 1
+
+new Slider upperThresholdSlider
+ set upperThresholdSlider.Title "UpperThreshold"
+ set upperThresholdSlider.Max 50
+ set upperThresholdSlider.In 500
+ set upperThresholdSlider.ChangeResolution 1
+
+new Slider smoothSlider
+ set smoothSlider.Title "Smooth"
+ set smoothSlider.Max 10
+ set smoothSlider.In 1
+ set smoothSlider.ChangeResolution 1
+
+new CommandButton refresh
+ set refresh.Label "Refresh"
+ set refresh.In "exec isoextractorthreshold;exec isoextractorsmooth;exec mainSplit"
+
+new MultipleInputs refreshimages
+ //connect slider.BoxChange refreshimages.In1
+ connect upperThresholdSlider.BoxChange refreshimages.In2
+ connect lowerThresholdSlider.BoxChange refreshimages.In3
+ connect smoothSlider.BoxChange refreshimages.In4
+
+#---------------------------------------------------------------------
+
+new Viewer2D viewer2DImageOriginal
+ connect reader.Out viewer2DImageOriginal.In
+ connect slider.Out viewer2DImageOriginal.Slice
+ connect slider.BoxChange viewer2DImageOriginal.BoxExecute
+
+#---------------------------------------------------------------------
+
+new BinaryThresholdImageFilter threshold
+ connect upperThresholdSlider.Out threshold.UpperThreshold
+ connect lowerThresholdSlider.Out threshold.LowerThreshold
+ set threshold.InsideValue 255
+ set threshold.OutsideValue 0
+ connect reader.Out threshold.In
+
+new Viewer2D viewer2DImageSegmented
+ connect threshold.Out viewer2DImageSegmented.In
+ connect slider.Out viewer2DImageSegmented.Slice
+// connect slider.BoxChange viewer2DImageSegmented.BoxExecute
+ connect refreshimages.Out viewer2DImageSegmented.BoxExecute
+
+#---------------------------------------------------------------------
+
+new ImageGaussianSmooth smooth
+ connect threshold.Out smooth.In
+ connect smoothSlider.Out smooth.StdDevX
+ connect smoothSlider.Out smooth.StdDevY
+ connect smoothSlider.Out smooth.StdDevZ
+
+
+new Viewer2D viewer2DImageSmooth
+ connect smooth.Out viewer2DImageSmooth.In
+ connect slider.Out viewer2DImageSmooth.Slice
+ connect slider.BoxChange viewer2DImageSmooth.BoxExecute
+
+
+#---------------------------------------------------------------------
+
+new LayoutLine upLayout
+ set upLayout.Orientation H
+ connect viewer2DImageOriginal.Widget upLayout.Widget1
+ connect viewer2DImageSegmented.Widget upLayout.Widget2
+ connect viewer2DImageSmooth.Widget upLayout.Widget3
+
+
+new ColourSelectorButton colourLower
+ set colourLower.In "0.5 0 0.5"
+
+new ColourSelectorButton colourUpper
+ set colourUpper.In "0.5 0.5 0.0"
+
+#---------------------------------------------------------------------
+
+new Viewer3D viewernvImagethreshold3D
+# set viewernvImagethreshold3D.nTypeView "5"
+
+new IsoSurfaceExtractor isoextractorthreshold
+ connect threshold.Out isoextractorthreshold.In
+ set isoextractorthreshold.Opacity 1
+ set isoextractorthreshold.Isovalue 10
+ connect colourUpper.Out isoextractorthreshold.Colour
+ connect viewernvImagethreshold3D.Renderer isoextractorthreshold.Renderer
+
+
+#---------------------------------------------------------------------
+new Viewer3D viewernvImageSmooth3D
+# set viewernvImageSmooth3D.nTypeView "5"
+ //connect refreshimages.Out viewernvImageSmooth3D.BoxExecute
+
+new IsoSurfaceExtractor isoextractorsmooth
+ connect smooth.Out isoextractorsmooth.In
+ set isoextractorsmooth.Opacity 1
+ set isoextractorsmooth.Isovalue 10
+ connect colourLower.Out isoextractorsmooth.Colour
+ connect viewernvImageSmooth3D.Renderer isoextractorsmooth.Renderer
+
+
+#---------------------------------------------------------------------
+
+new LayoutSplit downLayout
+ set downLayout.Orientation H
+ set downLayout.Proportion 50
+ connect viewernvImagethreshold3D.Widget downLayout.Widget1
+ connect viewernvImageSmooth3D.Widget downLayout.Widget2
+
+new LayoutLine sliderLayout
+ set sliderLayout.Orientation V
+
+new LayoutLine buttonLayout
+ set buttonLayout.Orientation V
+ connect colourLower.Widget buttonLayout.Widget1
+ connect colourUpper.Widget buttonLayout.Widget2
+ connect refresh.Widget buttonLayout.Widget3
+
+new LayoutLine toolLayout
+ set toolLayout.Orientation H
+ connect sliderLayout.Widget toolLayout.Widget1
+ connect buttonLayout.Widget toolLayout.Widget2
+
+
+//new ImageWriter imw
+// connect smooth.Out imw.In
+ connect refresh.BoxChange smooth.BoxExecute
+// set imw.Filename "/home/jpr/t8_eau_smooth.mhd"
+
+#---------------------------------------------------------------------
+new LayoutSplit splitUp
+ connect toolLayout.Widget splitUp.Widget1
+ connect upLayout.Widget splitUp.Widget2
+
+ connect slider.Widget sliderLayout.Widget1
+ connect lowerThresholdSlider.Widget sliderLayout.Widget2
+ connect upperThresholdSlider.Widget sliderLayout.Widget3
+ connect smoothSlider.Widget sliderLayout.Widget4
+
+
+new LayoutSplit mainSplit
+ set mainSplit.Proportion 30
+ connect splitUp.Widget mainSplit.Widget1
+ connect downLayout.Widget mainSplit.Widget2
+
+#---------------------------------------------------------------------
+
+exec isoextractorthreshold
+exec isoextractorsmooth
+exec mainSplit