]> Creatis software - creaRigidRegistration.git/blob - PackRecalage/src/bbPackRecalageTransform3D2PointsBox.h
b8551bc9b136804b78928f6f8840083a8e8da072
[creaRigidRegistration.git] / PackRecalage / src / bbPackRecalageTransform3D2PointsBox.h
1 #ifndef __bbPackRecalageTransform3D2PointsBox_h_INCLUDED__
2 #define __bbPackRecalageTransform3D2PointsBox_h_INCLUDED__
3 #include "bbPackRecalage_EXPORT.h"
4 #include "bbtkAtomicBlackBox.h"
5 #include "iostream"
6 #include "Transformer3D.h"
7 #include "vtkLinearTransform.h"
8 #include "vtkMath.h"
9 #include "PlanesOperations.h"
10
11 namespace bbPackRecalage
12 {
13
14 class bbPackRecalage_EXPORT Transform3D2PointsBox
15  : 
16    public bbtk::AtomicBlackBox
17 {
18   BBTK_BLACK_BOX_INTERFACE(Transform3D2PointsBox,bbtk::AtomicBlackBox);
19
20   /*Points in X*/
21   BBTK_DECLARE_INPUT(InX1,std::vector<int>);
22
23   /*Points in Y*/
24   BBTK_DECLARE_INPUT(InY1,std::vector<int>);
25
26   /*Points in Z*/
27   BBTK_DECLARE_INPUT(InZ1,std::vector<int>);
28
29   /*Points in X*/
30   BBTK_DECLARE_INPUT(InX2,std::vector<int>);
31
32   /*Points in Y*/
33   BBTK_DECLARE_INPUT(InY2,std::vector<int>);
34
35   /*Points in Z*/
36   BBTK_DECLARE_INPUT(InZ2,std::vector<int>);
37
38   /*Labels of points*/
39   BBTK_DECLARE_INPUT(Labels1,std::vector<std::string>);
40   /*Labels of points*/
41   BBTK_DECLARE_INPUT(Labels2,std::vector<std::string>);
42
43   /*Second angle*/
44   BBTK_DECLARE_INPUT(SecondAngle,double);
45
46   /*Resultant vtkTransform*/
47   BBTK_DECLARE_OUTPUT(Out, vtkTransform*);
48   
49   BBTK_PROCESS(Process);
50   void Process();
51
52   /*Class in charge of making the transformations*/
53   Transformer3D *transformer;
54
55   /*Class that does the vector operations*/
56   PlanesOperations *planes;
57 };
58
59 BBTK_BEGIN_DESCRIBE_BLACK_BOX(Transform3D2PointsBox,bbtk::AtomicBlackBox);
60 BBTK_NAME("Transform3D2PointsBox");
61 BBTK_AUTHOR("jn.trillos44@uniandes.edu.co");
62 BBTK_DESCRIPTION("Box useful for creating matrixes for 3D transformations defined by 2 points");
63 BBTK_CATEGORY("image");
64 BBTK_INPUT(Transform3D2PointsBox,InX1,"Points in X (first image)",std::vector<int>,"");
65 BBTK_INPUT(Transform3D2PointsBox,InY1,"Points in Y (first image)",std::vector<int>,"");
66 BBTK_INPUT(Transform3D2PointsBox,InZ1,"Points in Z (first image)",std::vector<int>,"");
67 BBTK_INPUT(Transform3D2PointsBox,InX2,"Points in X (second image)",std::vector<int>,"");
68 BBTK_INPUT(Transform3D2PointsBox,InY2,"Points in Y (second image)",std::vector<int>,"");
69 BBTK_INPUT(Transform3D2PointsBox,InZ2,"Points in Z (second image)",std::vector<int>,"");
70 BBTK_INPUT(Transform3D2PointsBox,SecondAngle,"Rotation to be done in second axis",double,"");
71 BBTK_INPUT(Transform3D2PointsBox,Labels1,"Labels of the points (first image)",std::vector<std::string>,"");
72 BBTK_INPUT(Transform3D2PointsBox,Labels2,"Labels of the points (second image)",std::vector<std::string>,"");
73 BBTK_OUTPUT(Transform3D2PointsBox,Out,"Transformation Matrix",vtkTransform*,"");
74 BBTK_END_DESCRIBE_BLACK_BOX(Transform3D2PointsBox);
75 }
76 // EO namespace bbPackRecalage
77
78 #endif // __bbPackRecalageTransform3DBox_h_INCLUDED__
79