]> Creatis software - bbtk.git/blob - packages/wxvtk/bbs/appli/exampleSynchro2ImagesSlicer.bbs
Feature #1774
[bbtk.git] / packages / wxvtk / bbs / appli / exampleSynchro2ImagesSlicer.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
28 description "elementary image synchronization tool"
29 author "info-dev at creatis.Insa-lyon.fr"
30 category  "tool image viewer"
31
32 include std
33 include vtk
34 include wx
35 include itk
36 include wxvtk
37 include itkvtk
38
39 load creaImageIO
40 load creaMaracasVisu
41
42 new ImagesChooserDialogBox chooser1
43 new ConcatImages reader1
44    connect chooser1.Out reader1.In
45
46 new ImagesChooserDialogBox chooser2
47 new ConcatImages reader2
48    connect chooser2.Out reader2.In
49
50 new ViewerNV viewer1
51    set viewer1.nTypeView 0
52 new ViewerNV viewer2
53    set viewer2.nTypeView 0
54
55 # slider is useless, since ViewerNV has no entry 'Slice Number' :-(
56 new Slider       slider
57 new LayoutSplit layout 
58 new LayoutLine layout_line
59 new ImageProperties imProperties
60 new GetVectorIntElement imSize
61 new Add add
62
63 connect reader1.Out      viewer1.In
64 connect slider.BoxChange viewer1.BoxExecute
65
66 connect reader2.Out       viewer2.In
67 connect slider.BoxChange viewer2.BoxExecute
68
69 connect slider.Widget layout.Widget1
70 connect layout_line.Widget layout.Widget2
71 connect viewer1.Widget layout_line.Widget1
72 connect viewer2.Widget layout_line.Widget2
73 connect reader1.Out imProperties.In
74 connect imProperties.Size imSize.In
75 connect imSize.Out add.In2
76 connect add.Out slider.Max
77
78 set slider.Title "Slice number"
79 set slider.ReactiveOnTrack 1
80 set layout.Proportion 10
81 set layout_line.Orientation H
82
83 set imSize.I 2
84 set add.In1 -1
85
86 exec layout