]> Creatis software - bbtk.git/blob - packages/vtk/src/bbvtkMeasureLength.h
#2969 BBTK Bug New Normal - MesureLength box in vtk package
[bbtk.git] / packages / vtk / src / bbvtkMeasureLength.h
1 //===== 
2 // Before editing this file, make sure it's a file of your own (i.e.: it wasn't generated from xml description; if so : your modifications will be lost)
3 //===== 
4 #ifndef __bbvtkMeasureLength_h_INCLUDED__
5 #define __bbvtkMeasureLength_h_INCLUDED__
6 #include "bbvtk_EXPORT.h"
7 #include "bbtkAtomicBlackBox.h"
8
9 #include "iostream"
10 #include "vector"
11 #include "math.h"
12
13 //VTK
14 #include "vtkPoints.h"
15 #include "vtkImageData.h"
16
17 namespace bbvtk
18 {
19
20 class bbvtk_EXPORT MeasureLength
21  : 
22    public bbtk::AtomicBlackBox
23 {
24   BBTK_BLACK_BOX_INTERFACE(MeasureLength,bbtk::AtomicBlackBox);
25 //===== 
26 // Before editing this file, make sure it's a file of your own (i.e.: it wasn't generated from xml description; if so : your modifications will be lost)
27 //===== 
28   BBTK_DECLARE_INPUT(Points,vtkPoints*);
29   BBTK_DECLARE_INPUT(ImageData,vtkImageData*);
30   BBTK_DECLARE_OUTPUT(Length,double);
31   BBTK_DECLARE_OUTPUT(LengthVoxels,double);
32   BBTK_PROCESS(Process);
33   void Process();
34 private:
35   vtkImageData* _image;
36   vtkPoints* _points;
37 //===== 
38 // Before editing this file, make sure it's a file of your own (i.e.: it wasn't generated from xml description; if so : your modifications will be lost)
39 //===== 
40 };
41
42 BBTK_BEGIN_DESCRIBE_BLACK_BOX(MeasureLength,bbtk::AtomicBlackBox);
43 BBTK_NAME("MeasureLength");
44 BBTK_AUTHOR("Ricardo A Corredor");
45 BBTK_DESCRIPTION("Evaluates the sum of the Euclidean distances among the points in the list following their order.");
46 BBTK_CATEGORY("");
47 BBTK_INPUT(MeasureLength,Points,"List of points",vtkPoints*,"");
48 BBTK_INPUT(MeasureLength,ImageData,"Set an image if you want real lentgh (usually in mm)",vtkImageData*,"");
49 BBTK_OUTPUT(MeasureLength,Length,"Sum of the Euclidean distances among the points",double,"");
50 BBTK_OUTPUT(MeasureLength,LengthVoxels,"Sum of the Euclidean distances among the points (Voxels)",double,"");
51 BBTK_END_DESCRIBE_BLACK_BOX(MeasureLength);
52 //===== 
53 // Before editing this file, make sure it's a file of your own (i.e.: it wasn't generated from xml description; if so : your modifications will be lost)
54 //===== 
55 }
56 // EO namespace bbvtk
57
58 #endif // __bbvtkMeasureLength_h_INCLUDED__
59