]> Creatis software - creaMaracasVisu.git/blob - bbtk/bbs/appli/Example_Segmentation_02.bbs
bug view MPR
[creaMaracasVisu.git] / bbtk / bbs / appli / Example_Segmentation_02.bbs
1 description "creaMaracasVisu::SegmentationConnectivity box example. "
2 category "example"
3 author "eduardo.davila@creatis.insa-lyon.fr"
4
5
6 load std
7 load vtk
8 load wx
9 load creaMaracasVisu
10
11 new LayoutLine sizerA
12 new LayoutSplit mainSplit
13
14 #new ViewerNV mpr
15 #  set mpr.nTypeView  "2 5"
16 new ViewerMPR mpr
17
18 new MetaImageReader reader
19 new CommandButton commandButton
20   set commandButton.In "exec segmentationconnectivity; exec surface"
21   set commandButton.Label "RUN"
22
23 new SegmentationConnectivity segmentationconnectivity
24 new IsoSurfaceExtractor surface
25   set surface.Opacity "0.8"
26   set surface.Isovalue "100"
27 new ConcatStrings concatstringsThreshold
28   set concatstringsThreshold.In2  " "
29
30 new SliderMinMax sliderThreshold
31   set sliderThreshold.Orientation 1
32   set sliderThreshold.InW 300
33   set sliderThreshold.InH 80
34   set sliderThreshold.InMax 6000
35   set sliderThreshold.InMin 0
36   set sliderThreshold.InMaxShow 6000
37   set sliderThreshold.InMinShow 1200
38   set sliderThreshold.ShowActual false
39 new OutputText  staticTextThreshold
40   set staticTextThreshold.In "Threshold"
41
42 include  std/boxes/bbPrependPackageDataPath.bbs
43 new PrependPackageDataPath prependDatapath 
44   set prependDatapath.In "vtk/hola.mhd" 
45   connect prependDatapath.Out reader.In 
46
47 connect reader.Out mpr.In
48
49 connect sizerA.Widget                                   mainSplit.Widget1
50 connect mpr.Widget                                      mainSplit.Widget2
51
52 connect staticTextThreshold.Widget              sizerA.Widget1
53 connect sliderThreshold.Widget                  sizerA.Widget2
54 connect commandButton.Widget            sizerA.Widget3
55
56 connect reader.Out segmentationconnectivity.In
57 connect mpr.Renderer surface.Renderer
58
59 connect segmentationconnectivity.Out surface.In
60 connect mpr.Point segmentationconnectivity.PositionXYZ
61
62 connect sliderThreshold.OutStart concatstringsThreshold.In1
63 connect sliderThreshold.OutEnd concatstringsThreshold.In3
64
65 connect concatstringsThreshold.Out segmentationconnectivity.ThresholdMinMax
66
67
68 #graph CURRENT 0
69 #graph
70
71 print $prependDatapath.Out$
72 print "   ueueueueueu    "
73
74 exec mainSplit