]> Creatis software - creaMaracasVisu.git/blob - bbtk/bbs/boxes/Measure3DLength_Widget.bbs
2d9d86a31619760bf4c3080d326bdce688c7197c
[creaMaracasVisu.git] / bbtk / bbs / boxes / Measure3DLength_Widget.bbs
1 # ----------------------------------
2 # - BBTKGEditor v 1.4 BBS BlackBox Script (Complex Box)
3 # - /tmpEED/creaTools/creatools_source/creaMaracasVisu/bbtk/bbs/boxes/Measure3DLength_Widget.bbs
4 # ----------------------------------
5
6 include std
7 include itkvtk
8 include vtk
9 include std
10 include creaMaracasVisu
11 include wx
12
13 define Measure3DLength_Widget creaMaracasVisu
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
18 category "example"
19
20 new vtk:vtkImageDataPointerRelay Box17
21
22 new std:MagicBox Box24
23
24 new creaMaracasVisu:ShowNPoints Box31
25
26 new wx:LayoutSplit Box32
27   set Box32.Proportion "10"
28
29 new wx:LayoutTab Box33
30
31 new wx:OutputText Box34
32   set Box34.Title "Units"
33
34 new wx:LayoutLine Box35
35
36 new creaMaracasVisu:DrawAxe3D Box36
37
38 new vtk:ImageVtkProperties Box38
39
40 new vtk:Transform Box39
41
42 new vtk:UpdateRender Box41
43   set Box41.Active "true"
44
45 new vtk:MeasureLength Box42
46
47 new vtk:PointsXYZtoVTKPoints Box43
48
49 new wx:OutputText Box13
50   set Box13.Title "Voxels"
51
52
53 connect Box17.Out Box31.Image
54 connect Box34.Widget Box35.Widget1
55 connect Box35.Widget Box32.Widget1
56 connect Box31.Widget Box32.Widget2
57 connect Box32.Widget Box33.Widget1
58 connect Box24.Out Box31.Renderer
59 connect Box31.lstPointsY Box36.lstPointY
60 connect Box31.lstPointsX Box36.lstPointX
61 connect Box24.Out Box36.Renderer
62 connect Box31.lstPointsZ Box36.lstPointZ
63 connect Box17.Out Box38.In
64 connect Box39.Out Box36.Transform
65 connect Box38.Spacing Box39.Scale
66 connect Box24.Out Box41.Renderer
67 connect Box31.BoxChange Box41.BoxExecute
68 connect Box42.Length Box34.In
69 connect Box43.Points Box42.Points
70 connect Box31.lstPointsX Box43.LstPointsX
71 connect Box31.lstPointsY Box43.LstPointsY
72 connect Box31.lstPointsZ Box43.LstPointsZ
73 connect Box31.BoxChange Box34.BoxExecute
74 connect Box17.Out Box42.ImageData
75 connect Box31.BoxChange Box36.BoxExecute
76 connect Box42.LengthVoxels Box13.In
77 connect Box13.Widget Box35.Widget2
78 connect Box31.BoxChange Box13.BoxExecute
79
80 # Complex input ports
81 input vtkimagedata Box17.In " "
82 input vtkrender Box24.In " "
83 input point Box31.In " "
84 input boxexecute Box31.BoxExecute " "
85
86 # Complex output ports
87 output widget Box33.Widget " "
88
89 message    
90
91 endefine