author "laurent.guigues at creatis.insa-lyon.fr"
category "example"
+include wxvtk/boxes/bbIsoSurfaceWithControls
+description "Example of IsoSurfaceWithControls."
+author "laurent.guigues at creatis.insa-lyon.fr"
+category "example"
+
include wxvtk/boxes/bbIsoSurfaceWithControls
include vtk/boxes/bbLoadHola
load wxvtk
new Viewer3D viewer
-new LoadHola image
+new LoadHola image1
+new LoadHola image2
+
+connect image1.Out surface1.In
+connect image2.Out surface2.In
+
+set surface1.Isovalue 100
+set surface1.Opacity 100
+set surface1.Colour "0.5 0 0"
+set surface1.Title "Iso-surface 1"
+
+set surface2.Isovalue 200
+set surface2.Opacity 20
+set surface2.Title "Iso-surface 2"
+
-connect image.Out surface1.In
-connect image.Out surface2.In
connect surface1.Out viewer.In1
connect surface2.Out viewer.In2
new MultipleInputs refresh
connect surface1.BoxChange refresh.In1
connect surface2.BoxChange refresh.In2
-connect refresh.Out viewer.BoxExecute
-new LayoutSplit main
+new LayoutLine main
new LayoutLine controls
connect viewer.Widget main.Widget1
connect controls.Widget main.Widget2
connect surface1.Widget controls.Widget1
connect surface2.Widget controls.Widget2
+set main.WinWidth 800
+set main.WinHeight 800
-set surface1.Isovalue 100
-set surface1.Opacity 100
-set surface1.Colour "0.5 0 0"
-set surface1.Title "Iso-surface 1"
-
-set surface2.Isovalue 200
-set surface2.Opacity 20
-set surface2.Title "Iso-surface 2"
-
-set main.WinWidth 1200
-set main.WinHide 1000
-
-#message All 9
exec main
+
+# BUG in pipeline update : have to plug forced execution of viewer
+# after creation of all windows
+connect refresh.Out viewer.BoxExecute
connect image.Out viewer.In
load std
-set viewer.WinTitle "ExampleViewer2D"
+
set viewer.Slice 20
-set viewer.WinWidth 400
-set viewer.WinHeight 400
-exec viewer
+#Quick and dirty fix for a known bug
+# viewer2D does not display image when first executed :
+# have to re-execute it after it has been created for example using a button
+new CommandButton refresh
+ set refresh.Label "Click here to Refresh"
+
+new LayoutLine layout
+connect viewer.Widget layout.Widget1
+connect refresh.Widget layout.Widget2
+connect refresh.BoxChange viewer.BoxExecute
+set layout.WinTitle "ExampleViewer2D"
+set layout.WinWidth 400
+set layout.WinHeight 400
-#Quick and dirty fix for a known bug :
-new CommandButton refresh
- set refresh.Label "Known bug : Black image, click here to Refresh"
- set refresh.In "exec viewer"
-exec refresh
+exec layout