load std load wx load wxvtk define SimpleSlicer wxvtk description "Simple 2D viewer of a slice of a 3D image. The slice is controlled by a slider. See exampleSimpleSlicer.bbs. Screenshot :
" author "laurent.guigues@creatis.insa-lyon.fr" category "viewer" new LayoutLine main new Viewer2D viewer2D new Slider slider # WE NEED a MultipleInputs Box to connect BOTH # slider.BoxChange AND the input BoxExecute # of the Complex box to viewer2D.BoxExecute new MultipleInputs refresh connect viewer2D.Widget main.Widget1 connect slider.Widget main.Widget2 connect slider.Out viewer2D.Slice connect slider.BoxChange refresh.In1 connect refresh.Out viewer2D.BoxExecute #set main.Proportion 80 set slider.Title "Slice" input In viewer2D.In "Input image" input WinTitle main.WinTitle "Title of the window" input WinWidth main.WinWidth "Width of the window" input WinHeight main.WinHeight "Height of the window" input BoxExecute refresh.In2 "Execute the box" input Slice slider.In "Initial slice" output Widget main.Widget "Widget" # EXECUTING THE COMPLEX BOX EXECUTES main exec main endefine