1 # ---------------------------------------------------------------------
3 # Copyright (c) CREATIS (Centre de Recherche en Acquisition et Traitement de l'Image
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
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.
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
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 # ------------------------------------------------------------------------ */
27 description "A tour of wxvtk boxes"
28 author "laurent.guigues@creatis.insa-lyon.fr"
31 # put all include before or will be within echo 2 and generate many messages...
36 # To avoid getting textual help
39 #==================================================================
41 print "====================================="
42 print "A simple 2D viewer"
43 print "====================================="
49 connect reader.Out viewer.In
51 set viewer.WinDialog true
57 print "====================================="
58 print "A simple 2D slicer"
59 print "====================================="
64 new SimpleSlicer viewer
65 connect reader.Out viewer.In
66 set viewer.WinDialog true
72 print "====================================="
73 print "A double 2D slicer"
74 print "====================================="
79 new DoubleSlicer viewer
80 connect reader.Out viewer.In1
81 connect reader.Out viewer.In2
82 set viewer.WinDialog true
88 print "====================================="
89 print "Slicing an image in 3D"
90 print "====================================="
96 new ImagePlanes planes
98 connect reader.Out planes.In
99 connect planes.PlaneX viewer.Obs1
100 connect planes.PlaneY viewer.Obs2
101 connect planes.PlaneZ viewer.Obs3
102 set viewer.WinDialog true
108 print "====================================="
109 print "Viewing an iso-surface of an image in 3D"
110 print "====================================="
111 help SimpleIsoSurfaceViewer
115 new SimpleIsoSurfaceViewer viewer
116 connect reader.Out viewer.In
117 set viewer.WinDialog true
123 print "====================================="
124 print "Viewing both 3 slices and an iso-surface of an image in 3D"
125 print "====================================="
126 help IsoSurfaceWidget
131 new ImagePlanes planes
132 connect reader.Out planes.In
133 connect planes.PlaneX viewer.Obs1
134 connect planes.PlaneY viewer.Obs2
135 connect planes.PlaneZ viewer.Obs3
136 new IsoSurfaceWidget isosurface
137 connect reader.Out isosurface.In
138 connect isosurface.Out viewer.In1
139 connect isosurface.BoxChange viewer.BoxExecute
142 connect viewer.Widget main.Widget1
143 connect isosurface.Widget main.Widget2
144 set main.Proportion 70
145 set main.WinDialog true
151 print "====================================="
152 print "Volume rendering"
153 print "====================================="
158 new PiecewiseFunction color
159 new PiecewiseFunction opacity
160 new VolumeRenderer renderer
163 connect reader.Out renderer.In
164 connect color.Out renderer.ColorFunction
165 connect opacity.Out renderer.OpacityFunction
166 connect renderer.Out viewer.In1
168 set color.X "0 500 1000"
169 set color.Y "0 0.01 1"
170 set opacity.X "0 500 1000"
171 set opacity.Y "0 0.01 0.1"
173 set viewer.WinDialog true
180 print "====================================="
182 print "====================================="