]> Creatis software - creaMaracasVisu.git/blob - bbtk/bbs/boxes/Measure3DLength_Widget.bbs
#3009 creaMaracasVisu Feature New Normal - Interpolate option in box ViewerNV
[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   set Box32.WinTitle "Measure"
29
30 new wx:LayoutTab Box33
31
32 new wx:OutputText Box34
33   set Box34.Title "Units"
34
35 new wx:LayoutLine Box35
36
37 new creaMaracasVisu:DrawAxe3D Box36
38
39 new vtk:ImageVtkProperties Box38
40
41 new vtk:Transform Box39
42
43 new vtk:UpdateRender Box41
44   set Box41.Active "true"
45
46 new vtk:MeasureLength Box42
47
48 new vtk:PointsXYZtoVTKPoints Box43
49
50 new wx:OutputText Box13
51   set Box13.Title "Voxels"
52
53
54 connect Box17.Out Box31.Image
55 connect Box34.Widget Box35.Widget1
56 connect Box35.Widget Box32.Widget1
57 connect Box31.Widget Box32.Widget2
58 connect Box32.Widget Box33.Widget1
59 connect Box24.Out Box31.Renderer
60 connect Box31.lstPointsY Box36.lstPointY
61 connect Box31.lstPointsX Box36.lstPointX
62 connect Box24.Out Box36.Renderer
63 connect Box31.lstPointsZ Box36.lstPointZ
64 connect Box17.Out Box38.In
65 connect Box39.Out Box36.Transform
66 connect Box38.Spacing Box39.Scale
67 connect Box24.Out Box41.Renderer
68 connect Box31.BoxChange Box41.BoxExecute
69 connect Box42.Length Box34.In
70 connect Box43.Points Box42.Points
71 connect Box31.lstPointsX Box43.LstPointsX
72 connect Box31.lstPointsY Box43.LstPointsY
73 connect Box31.lstPointsZ Box43.LstPointsZ
74 connect Box31.BoxChange Box34.BoxExecute
75 connect Box17.Out Box42.ImageData
76 connect Box31.BoxChange Box36.BoxExecute
77 connect Box42.LengthVoxels Box13.In
78 connect Box13.Widget Box35.Widget2
79 connect Box31.BoxChange Box13.BoxExecute
80
81 # Complex input ports
82 input vtkimagedata Box17.In " "
83 input vtkrender Box24.In " "
84 input point Box31.In " "
85 input boxexecute Box31.BoxExecute " "
86
87 # Complex output ports
88 output widget Box33.Widget " "
89
90 message    
91
92 endefine