]> Creatis software - bbtk.git/blob - packages/wxvtk/bbs/boxes/bbDoubleSlicer.bbs
595744ff8cae322e29417d3663baefa888c450d4
[bbtk.git] / packages / wxvtk / bbs / boxes / bbDoubleSlicer.bbs
1 load std 
2 load wx
3 load wxvtk 
4
5 define DoubleSlicer wxvtk
6
7  description "Simple viewer displaying the same slice of two images. The slice is controlled by a slider. See <a href='#exampleDoubleSlicer'>exampleDoubleSlicer.bbs</a>."
8  author "laurent.guigues at creatis.insa-lyon.fr"
9
10  new LayoutSplit main
11  new LayoutLine slicers
12  new Viewer2D slicer1
13  new Viewer2D slicer2
14  new Slider slider
15
16  set main.Proportion 80
17  set slicers.Orientation HORIZONTAL
18
19  connect slicers.Widget main.Widget1
20  connect slicer1.Widget slicers.Widget1
21  connect slicer2.Widget slicers.Widget2
22  connect slider.Widget main.Widget2
23  connect slider.Out slicer1.Slice
24  connect slider.Out slicer2.Slice
25
26
27  # WE NEED A MultipleInputs BOX TO CONNECT BOTH 
28  # slider.BoxChange AND THE INPUT BoxExecuteSlicer1
29  # OF THE COMPLEX BOX TO slicer1.BoxExecute
30  # idem for slicer2
31  new MultipleInputs refresh1
32  new MultipleInputs refresh2
33  connect refresh1.Out slicer1.BoxExecute
34  connect refresh2.Out slicer2.BoxExecute
35
36  connect slider.BoxChange refresh2.In1
37  connect slider.BoxChange refresh1.In1
38
39 # set main.Proportion 80
40  set slider.Title "Slice"
41
42  input In1 slicer1.In "Left (or top) image"
43  input In2 slicer2.In "Right (or bottom) image"
44
45  input WinDialog main.WinDialog "Execute in dialog mode"
46  input WinTitle main.WinTitle "Title of the window"
47  input WinWidth main.WinWidth "Width of the window"
48  input WinHeight main.WinHeight "Width of the window"
49  input Orientation slicers.Orientation "Orientation of the images (0=Horizontal / 1=Vertical)"
50  input RefreshSlicer1 refresh1.In2 "Refreshes the first slicer"
51  input RefreshSlicer2 refresh2.In2 "Refreshes the second slicer"
52  input BoxProcessModeSlicer1 slicer1.BoxProcessMode "Process mode of the first slicer"
53  input BoxProcessModeSlicer2 slicer2.BoxProcessMode "Process mode of the second slicer"
54
55  output Widget main.Widget "Widget"
56
57 # exec slicer1
58  exec main
59
60 endefine
61