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