]> Creatis software - creaMaracasVisu.git/blob - bbtk/bbs/appli/examplePlaneNPoints.bbs
Support #1768 CREATIS Licence insertion
[creaMaracasVisu.git] / bbtk / bbs / appli / examplePlaneNPoints.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 description " 3points -> 1-plane "
27 author "info-dev@creatis.insa-lyon.fr"
28 category "example"
29
30 include vtk/boxes/bbLoadHola
31 load vtk
32 load wxvtk
33 load creaMaracasVisu
34 load std
35 load wx
36
37 //new LoadHola reader
38
39 new FileSelector openFileDialog
40   set openFileDialog.Wildcard  "(*.mhd)|*.mhd"
41 new MetaImageReader reader
42    connect openFileDialog.Out reader.In
43    
44 new ImagePlanes planes
45 connect reader.Out planes.In
46
47 #new Viewer3D viewer
48
49 #connect planes.PlaneX viewer.Obs1
50 #connect planes.PlaneY viewer.Obs2
51 #connect planes.PlaneZ viewer.Obs3
52 #connect planes.Plane3Pts viewer.Obs4
53 #set viewer.WinTitle "Show N Points"
54 #set viewer.WinWidth 350
55 #set viewer.WinHeight 400
56
57 new TransferFunctionView transferfunc
58         connect reader.Out transferfunc.In
59
60 new ViewerNV viewernv
61         set viewernv.nTypeView "6 1 2 0"
62         #set viewernv.nTypeView "6"
63         connect reader.Out viewernv.In
64         connect transferfunc.ColorFunction viewernv.ColorFunction
65         connect transferfunc.WindowLevel viewernv.WindowLevel
66         connect transferfunc.ColorLevel viewernv.ColorLevel     
67         
68 new ShowNPoints showpoints
69         connect reader.Out showpoints.Image
70         connect showpoints.lstPointsX planes.PointsX
71         connect showpoints.lstPointsY planes.PointsY
72         connect showpoints.lstPointsZ planes.PointsZ
73         #set planes.PointsX "10 10 50"
74         #set planes.PointsY "10 50 20"
75         #set planes.PointsZ "10 10 30"
76         connect viewernv.BoxChange showpoints.BoxExecute
77         connect viewernv.Point showpoints.In
78         connect viewernv.Renderer1 showpoints.Renderer
79         set showpoints.Radio 1
80
81 new ImageActor imgactor
82         connect planes.Image3Pts imgactor.In
83         connect viewernv.Renderer1 imgactor.Renderer
84         connect planes.Transform3Pts imgactor.Transform
85
86 new Viewer2D view2d
87 new CommandButton execplanes
88         set execplanes.Label "Refresh planes"
89         connect execplanes.BoxChange planes.BoxExecute  
90         connect execplanes.BoxChange view2d.BoxExecute  
91         connect execplanes.BoxChange imgactor.BoxExecute
92         #connect execplanes.BoxChange viewer.BoxExecute 
93                 
94 new LayoutLine layoutline0
95 connect showpoints.Widget layoutline0.Widget1
96 connect execplanes.Widget layoutline0.Widget2
97 connect transferfunc.Widget layoutline0.Widget3
98
99 new LayoutLine layoutline1
100 connect viewernv.Widget layoutline1.Widget1
101
102 new LayoutSplit mainSplit
103 set mainSplit.Orientation H
104 set mainSplit.Proportion 10
105 connect layoutline0.Widget mainSplit.Widget1
106 connect layoutline1.Widget mainSplit.Widget2
107
108 exec mainSplit
109
110 connect planes.Image3Pts view2d.In