]> Creatis software - creaMaracasVisu.git/blob - bbtk/bbs/appli/exampleCutModule2.bbs
Support #1768 CREATIS Licence insertion
[creaMaracasVisu.git] / bbtk / bbs / appli / exampleCutModule2.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 load vtk
27 load wxvtk
28 load creaMaracasVisu
29 load std
30 load wx
31
32 new FileSelector filselect0
33         set filselect0.Message "Select image"
34         set filselect0.Wildcard "*.mhd"
35         #set filselect0.DefaultDir "C:\Creatis\creaAppli\Data\Images"           
36 new MetaImageReader gimm        
37                 connect filselect0.Out gimm.In
38 new ImageCastToUShort image
39         connect gimm.Out image.In       
40
41 new VolumeRendering volrend
42                 connect image.Out volrend.In1
43 new SurfaceRendering surrend    
44               # connect image.Out surrend.In0
45
46 new ViewerNV view1
47 set view1.nTypeView 6
48                 connect gimm.Out view1.In
49         
50 new CutModule2 cut
51         connect view1.Interactor1 cut.Interactor
52         connect view1.Renderer1 cut.Renderer
53         connect image.Out cut.In
54         
55 new ViewerNV view2
56         set view2.nTypeView 6
57         connect image.Out view2.In
58
59 connect view1.BoxChange cut.BoxExecute  
60
61 new LayoutSplit layoutsplit1
62                 set layoutsplit1.Orientation V
63                 connect volrend.Widget layoutsplit1.Widget1
64                 connect surrend.Widget layoutsplit1.Widget2
65
66                 new LayoutSplit layoutsplit2
67                                 set layoutsplit2.Orientation H
68                                 connect layoutsplit1.Widget layoutsplit2.Widget1
69                                 #connect view1.Widget layoutsplit2.Widget2
70
71                 new LayoutTab laytab
72                                 connect laytab.Widget layoutsplit2.Widget2 
73                                 connect view1.Widget laytab.Widget2
74                         connect view2.Widget laytab.Widget1   
75
76 new LayoutLine layoutline1      
77         connect cut.Widget layoutline1.Widget1  
78         
79 new LayoutSplit layoutsplit3
80         set layoutsplit3.Orientation H
81         set layoutsplit3.Proportion 80
82                 set layoutsplit3.WinTitle "Cutting Tool"
83         connect layoutline1.Widget layoutsplit3.Widget2 
84         connect layoutsplit2.Widget layoutsplit3.Widget1
85         
86 exec layoutsplit3
87
88 set cut.BoxExecute 1
89 exec cut
90
91 connect view2.Renderer1 volrend.Renderer
92 connect view2.Renderer1 surrend.Renderer
93
94 exec volrend
95 exec surrend
96
97 #connect cut.BoxChange volrend.BoxExecute
98 #connect cut.BoxChange volrend.BoxExecute