]> Creatis software - bbtk.git/blob - packages/vtk/bbs/appli/exampleMeasureLength.bbs
Feature #1886 Black boxes to measure lengths on images. Look into
[bbtk.git] / packages / vtk / bbs / appli / exampleMeasureLength.bbs
1 # ----------------------------------
2 # - BBTKGEditor v 1.4 BBS BlackBox Script
3 # - /home/corredor/Software/CreaTools/All_Dec2012/creatools_source/bbtk/packages/vtk/bbs/appli/exampleMeasureLength.bbs
4 # ----------------------------------
5
6 # BBTK GEditor Script
7 # ----------------------
8
9 include std
10 include itkvtk
11 include creaMaracasVisu
12 include wx
13 include vtk
14
15 author "Ricardo A Corredor"
16 description "Evaluates the sum of the Euclidean distances among the points in the list following their order. Put some points in the image using the Points Widget and the click on Evaluate Length button. "
17 category "example"
18
19 new ShowNPoints Box00
20   set Box00.WinTitle "Points Widget"
21   set Box00.WinWidth "200"
22
23 new ViewerNV Box02
24   set Box02.WinTitle "Image Viewer"
25
26 new CommandButton Box03
27   set Box03.Label "Evaluate length..."
28   set Box03.WinHeight "200"
29   set Box03.WinTitle "Measure Length"
30   set Box03.WinWidth "200"
31
32 new MeasureLength Box04
33
34 new PointsXYZtoVTKPoints Box05
35
36 new OutputText Box06
37
38 new MetaImageReader Box07
39
40 new FileSelector Box08
41   set Box08.Message "Select an image ..."
42   set Box08.Title "Select an image ..."
43
44
45 connect Box02.Renderer1 Box00.Renderer
46
47 connect Box02.Point Box00.In
48
49 connect Box02.BoxChange Box00.BoxExecute
50
51 connect Box00.lstPointsX Box05.LstPointsX
52
53 connect Box00.lstPointsY Box05.LstPointsY
54
55 connect Box00.lstPointsZ Box05.LstPointsZ
56
57 connect Box05.Points Box04.Points
58
59 connect Box03.BoxChange Box06.BoxExecute
60
61 connect Box04.Length Box06.In
62
63 connect Box07.Out Box02.In
64
65 connect Box07.Out Box04.ImageData
66
67 connect Box07.Out Box00.Image
68
69 connect Box08.Out Box07.In
70
71
72
73 # Complex input ports
74 exec Box00
75 exec Box02
76 exec Box03