1 # ----------------------------------
2 # - BBTKGEditor v 1.4 BBS BlackBox Script (Complex Box)
3 # - /tmpEED/creaTools/creatools_source/creaMaracasVisu/bbtk/bbs/boxes/Measure3DLength_Widget.bbs
4 # ----------------------------------
10 include creaMaracasVisu
13 define Measure3DLength_Widget creaMaracasVisu
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. "
20 new vtk:vtkImageDataPointerRelay Box17
22 new std:MagicBox Box24
24 new creaMaracasVisu:ShowNPoints Box31
26 new wx:LayoutSplit Box32
27 set Box32.Proportion "10"
29 new wx:LayoutTab Box33
31 new wx:OutputText Box34
32 set Box34.Title "Units"
34 new wx:LayoutLine Box35
36 new creaMaracasVisu:DrawAxe3D Box36
38 new vtk:ImageVtkProperties Box38
40 new vtk:Transform Box39
42 new vtk:UpdateRender Box41
43 set Box41.Active "true"
45 new vtk:MeasureLength Box42
47 new vtk:PointsXYZtoVTKPoints Box43
49 new wx:OutputText Box13
50 set Box13.Title "Voxels"
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
81 input vtkimagedata Box17.In " "
82 input vtkrender Box24.In " "
83 input point Box31.In " "
84 input boxexecute Box31.BoxExecute " "
86 # Complex output ports
87 output widget Box33.Widget " "