]> Creatis software - bbtk.git/blob - packages/demo/bbs/appli/demoPlane3Pts.bbs
Feature #1774
[bbtk.git] / packages / demo / bbs / appli / demoPlane3Pts.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 " How to choose points in a 3D image "
27 author "davila at creatis.insa-lyon.fr"
28 category "demo"
29
30 // See also examplePlane3Pts.bbs
31 // To know how to read more images.
32
33 include vtk/boxes/bbLoadHola
34 load vtk
35 load wxvtk
36 load creaMaracasVisu
37 load std
38 load wx
39
40 new LoadHola reader
41
42 new ImagePlanes planes
43 connect reader.Out planes.In
44
45 new ViewerNV viewernv
46         #set viewernv.nTypeView "6 1 2 0"
47         set viewernv.nTypeView "6"
48         connect reader.Out viewernv.In
49
50 new ShowNPoints showpoints
51         connect reader.Out showpoints.Image
52         connect showpoints.lstPointsX planes.PointsX
53         connect showpoints.lstPointsY planes.PointsY
54         connect showpoints.lstPointsZ planes.PointsZ
55         connect viewernv.BoxChange showpoints.BoxExecute
56         connect viewernv.Point showpoints.In
57         connect viewernv.Renderer1 showpoints.Renderer
58         set showpoints.Radio 1
59
60 new ImageActor imgactor
61         connect planes.Image3Pts imgactor.In
62         connect viewernv.Renderer1 imgactor.Renderer
63         connect planes.Transform3Pts imgactor.Transform
64
65 new Viewer2D view2d
66 new CommandButton execplanes
67         set execplanes.Label "Refresh planes"
68         connect execplanes.BoxChange planes.BoxExecute  
69         connect execplanes.BoxChange view2d.BoxExecute  
70         connect execplanes.BoxChange imgactor.BoxExecute
71         #connect execplanes.BoxChange viewer.BoxExecute 
72
73 new LayoutLine layoutline0
74    connect showpoints.Widget layoutline0.Widget1
75    connect execplanes.Widget layoutline0.Widget2
76
77 new LayoutLine layoutline1
78    connect viewernv.Widget layoutline1.Widget1
79
80 new LayoutSplit mainSplit
81    set mainSplit.WinWidth 1500
82    set mainSplit.Orientation H
83    set mainSplit.Proportion 15
84    connect layoutline0.Widget mainSplit.Widget1
85    connect layoutline1.Widget mainSplit.Widget2
86
87 exec mainSplit
88
89 connect planes.Image3Pts view2d.In