]> Creatis software - bbtk.git/blob - packages/vtk/bbs/old/exampleGaussianSmooth_02.bbs
Feature #1774
[bbtk.git] / packages / vtk / bbs / old / exampleGaussianSmooth_02.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 print "=== GaussianSmooth_02 box example ==="
28 description "GaussianSmooth Save box.  Screenshot : <img src=ExampleGaussianSmooth_02.JPG></img>"
29 author "eduardo.davila at creatis.insa-lyon.fr"
30 category "example"
31
32 include wx
33 include itk
34 include vtk
35 include wxvtk
36 include itkvtk
37
38 new FileSelector fileselectoropen
39   set fileselectoropen.OpenSave "Open" 
40   
41 new ImageReader imagereader
42   connect fileselectoropen.Out imagereader.In
43
44 new Viewer2D viewerleft
45   connect imagereader.Out viewerleft.In
46   
47 new Slider slidersmooth
48   set slidersmooth.In 1
49   set slidersmooth.Max 10
50   set slidersmooth.Title "Gaussian smooth "
51     
52 new ImageGaussianSmooth smooth
53   connect imagereader.Out smooth.In
54   connect slidersmooth.Out smooth.StdDevX
55   connect slidersmooth.Out smooth.StdDevY
56   connect slidersmooth.Out smooth.StdDevZ
57   connect slidersmooth.BoxChange smooth.BoxExecute
58   
59 new Viewer2D viewerright
60   connect smooth.Out viewerright.In
61   connect slidersmooth.BoxChange viewerright.BoxExecute
62   
63 new LayoutLine layoutlineviwer
64    set layoutlineviwer.Orientation H
65    connect viewerleft.Widget layoutlineviwer.Widget1
66    connect viewerright.Widget layoutlineviwer.Widget2
67
68 new FileSelector fileselectorsave
69   set fileselectorsave.OpenSave "Save" 
70    
71 new ImageWriter imagewrite
72     connect smooth.Out imagewrite.In   
73     connect fileselectorsave.Out imagewrite.Filename   
74        
75 new CommandButton btnSave
76    set btnSave.Label "Save smooth"   
77    connect btnSave.BoxChange fileselectorsave.BoxExecute 
78    connect btnSave.BoxChange imagewrite.BoxExecute 
79
80 new LayoutLine layoutline
81    connect slidersmooth.Widget layoutline.Widget1
82    connect btnSave.Widget layoutline.Widget2
83    
84 new LayoutSplit main   
85    connect layoutlineviwer.Widget main.Widget1
86    connect layoutline.Widget main.Widget2
87    
88    
89 exec main