]> Creatis software - bbtk.git/blob - packages/wxvtk/bbs/boxes/bbDoubleSlicer.bbs
Feature #1774
[bbtk.git] / packages / wxvtk / bbs / boxes / bbDoubleSlicer.bbs
1  # ---------------------------------------------------------------------
2  #
3  # Copyright (c) CREATIS (Centre de Recherche en Acquisition et Traitement de l'Image
4  #                        pour la SantÈ)
5  # Authors : Eduardo Davila, Frederic Cervenansky, Claire Mouton
6  # Previous Authors : Laurent Guigues, Jean-Pierre Roux
7  # CreaTools website : www.creatis.insa-lyon.fr/site/fr/creatools_accueil
8  #
9  #  This software is governed by the CeCILL-B license under French law and
10  #  abiding by the rules of distribution of free software. You can  use,
11  #  modify and/ or redistribute the software under the terms of the CeCILL-B
12  #  license as circulated by CEA, CNRS and INRIA at the following URL
13  #  http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html
14  #  or in the file LICENSE.txt.
15  #
16  #  As a counterpart to the access to the source code and  rights to copy,
17  #  modify and redistribute granted by the license, users are provided only
18  #  with a limited warranty  and the software's author,  the holder of the
19  #  economic rights,  and the successive licensors  have only  limited
20  #  liability.
21  #
22  #  The fact that you are presently reading this means that you have had
23  #  knowledge of the CeCILL-B license and that you accept its terms.
24  # ------------------------------------------------------------------------ */
25
26
27 load std 
28 load wx
29 load wxvtk 
30
31 define DoubleSlicer wxvtk
32
33  description "Simple viewer displaying the same slice of two images. The slice is controlled by a slider. See <a href='#exampleDoubleSlicer'>exampleDoubleSlicer.bbs</a>."
34  author "laurent.guigues at creatis.insa-lyon.fr"
35
36  new LayoutSplit main
37  new LayoutLine slicers
38  new Viewer2D slicer1
39  new Viewer2D slicer2
40  new Slider slider
41
42  set main.Proportion 80
43  set slicers.Orientation HORIZONTAL
44
45  connect slicers.Widget main.Widget1
46  connect slicer1.Widget slicers.Widget1
47  connect slicer2.Widget slicers.Widget2
48  connect slider.Widget main.Widget2
49  connect slider.Out slicer1.Slice
50  connect slider.Out slicer2.Slice
51
52
53  # WE NEED A MultipleInputs BOX TO CONNECT BOTH 
54  # slider.BoxChange AND THE INPUT BoxExecuteSlicer1
55  # OF THE COMPLEX BOX TO slicer1.BoxExecute
56  # idem for slicer2
57  new MultipleInputs refresh1
58  new MultipleInputs refresh2
59  connect refresh1.Out slicer1.BoxExecute
60  connect refresh2.Out slicer2.BoxExecute
61
62  connect slider.BoxChange refresh2.In1
63  connect slider.BoxChange refresh1.In1
64
65 # set main.Proportion 80
66  set slider.Title "Slice"
67
68  input In1 slicer1.In "Left (or top) image"
69  input In2 slicer2.In "Right (or bottom) image"
70
71  input WinDialog main.WinDialog "Execute in dialog mode"
72  input WinTitle main.WinTitle "Title of the window"
73  input WinWidth main.WinWidth "Width of the window"
74  input WinHeight main.WinHeight "Width of the window"
75  input Orientation slicers.Orientation "Orientation of the images (0=Horizontal / 1=Vertical)"
76  input RefreshSlicer1 refresh1.In2 "Refreshes the first slicer"
77  input RefreshSlicer2 refresh2.In2 "Refreshes the second slicer"
78  input BoxProcessModeSlicer1 slicer1.BoxProcessMode "Process mode of the first slicer"
79  input BoxProcessModeSlicer2 slicer2.BoxProcessMode "Process mode of the second slicer"
80
81  output Widget main.Widget "Widget"
82
83 # exec slicer1
84  exec main
85
86 endefine
87