]> Creatis software - bbtk.git/blob - packages/vtk/src/bbvtkMeasureLength.h
d7110e96693ed06f85877ae7f23b16427a69aa17
[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_PROCESS(Process);
32   void Process();
33 private:
34   vtkImageData* _image;
35   vtkPoints* _points;
36 //===== 
37 // 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)
38 //===== 
39 };
40
41 BBTK_BEGIN_DESCRIBE_BLACK_BOX(MeasureLength,bbtk::AtomicBlackBox);
42 BBTK_NAME("MeasureLength");
43 BBTK_AUTHOR("Ricardo A Corredor");
44 BBTK_DESCRIPTION("Evaluates the sum of the Euclidean distances among the points in the list following their order.");
45 BBTK_CATEGORY("");
46 BBTK_INPUT(MeasureLength,Points,"List of points",vtkPoints*,"");
47 BBTK_INPUT(MeasureLength,ImageData,"Set an image if you want real lentgh (usually in mm)",vtkImageData*,"");
48 BBTK_OUTPUT(MeasureLength,Length,"Sum of the Euclidean distances among the points",double,"");
49 BBTK_END_DESCRIBE_BLACK_BOX(MeasureLength);
50 //===== 
51 // 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)
52 //===== 
53 }
54 // EO namespace bbvtk
55
56 #endif // __bbvtkMeasureLength_h_INCLUDED__
57