]> Creatis software - bbtk.git/blob - packages/wxvtk/bbs/appli/exampleSynchro2ImagesSlicerMHD.bbs
Feature #1774
[bbtk.git] / packages / wxvtk / bbs / appli / exampleSynchro2ImagesSlicerMHD.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 # my_MHD_slicer.bbs
28  
29 description "elementary 3D image synchronization tool"
30 author "maciej.orkisz at creatis.Insa-lyon.fr"
31 #category "example"
32 category  "application image viewer"
33 #category "image"
34 #category "viewer"
35
36 include std
37 include vtk
38 include wx
39 include itk
40 include wxvtk
41 include itkvtk
42
43 new FileSelector fileDialog1
44 new MetaImageReader reader1
45 new FileSelector fileDialog2
46 new MetaImageReader reader2
47 new Viewer2D     viewer1
48 new Viewer2D     viewer2
49 new Slider       slider
50 new LayoutSplit layout 
51 new LayoutLine layout_line
52 new ImageProperties imProperties
53 new GetVectorIntElement imSize
54 new Add add
55
56 connect fileDialog1.Out   reader1.In 
57 connect reader1.Out       viewer1.In
58 connect slider.Out       viewer1.Slice
59 connect slider.BoxChange viewer1.BoxExecute
60
61 connect fileDialog2.Out   reader2.In 
62 connect reader2.Out       viewer2.In
63 connect slider.Out       viewer2.Slice
64 connect slider.BoxChange viewer2.BoxExecute
65
66 connect slider.Widget layout.Widget1
67 connect layout_line.Widget layout.Widget2
68 connect viewer1.Widget layout_line.Widget1
69 connect viewer2.Widget layout_line.Widget2
70 connect reader1.Out imProperties.In
71 connect imProperties.Size imSize.In
72 connect imSize.Out add.In2
73 connect add.Out slider.Max
74
75 set fileDialog1.Message "Select the first (left) MHD image file"
76 set fileDialog2.Message "Select the second (right) MHD image file"
77 set slider.Title "Slice number"
78 set slider.ReactiveOnTrack 1
79 set layout.Proportion 10
80 set layout_line.Orientation H
81
82 set fileDialog1.DefaultDir "."
83 set fileDialog2.DefaultDir "."
84 set imSize.I 2
85 set add.In1 -1
86
87 exec layout