]> Creatis software - creaRigidRegistration.git/blob - PackRecalage/src/bbPackRecalageCalculateVectorBox.h
*** empty log message ***
[creaRigidRegistration.git] / PackRecalage / src / bbPackRecalageCalculateVectorBox.h
1 #ifndef __bbPackRecalageCalculateVectorBox_h_INCLUDED__
2 #define __bbPackRecalageCalculateVectorBox_h_INCLUDED__
3 #include "bbPackRecalage_EXPORT.h"
4 #include "bbtkAtomicBlackBox.h"
5 #include "iostream"
6
7 #include "VectorMath.h"
8
9 namespace bbPackRecalage
10 {
11
12 class bbPackRecalage_EXPORT CalculateVectorBox
13  : 
14    public bbtk::AtomicBlackBox
15 {
16   BBTK_BLACK_BOX_INTERFACE(CalculateVectorBox,bbtk::AtomicBlackBox);
17
18   /*Points in X for the first vector (the vector in the first image), this array should have the structure (a,b), "a" being the position in X for the starting point of the vector
19         and "b" the position in X for the ending point of the vector */
20   BBTK_DECLARE_INPUT(PointsX1,std::vector<int>);
21   
22   /*Points in X for the second vector (the vector in the second image), this array should have the structure (a,b), "a" being the position in X for the starting point of the vector
23         and "b" the position in X for the ending point of the vector */
24   BBTK_DECLARE_INPUT(PointsX2,std::vector<int>);
25
26   /*Points in Y for the first vector (the vector in the first image), this array should have the structure (a,b), "a" being the position in Y for the starting point of the vector
27         and "b" the position in Y for the ending point of the vector */
28   BBTK_DECLARE_INPUT(PointsY1,std::vector<int>);
29
30   /*Points in Y for the second vector (the vector in the second image), this array should have the structure (a,b), "a" being the position in Y for the starting point of the vector
31         and "b" the position in Y for the ending point of the vector */
32   BBTK_DECLARE_INPUT(PointsY2,std::vector<int>);
33
34   /*Points in Z for the first vector (the vector in the first image), this array should have the structure (a,b), "a" being the position in Z for the starting point of the vector
35         and "b" the position in Z for the ending point of the vector */
36   BBTK_DECLARE_INPUT(PointsZ1,std::vector<int>);
37
38   /*Points in Z for the second vector (the vector in the second image), this array should have the structure (a,b), "a" being the position in Z for the starting point of the vector
39         and "b" the position in Z for the ending point of the vector */
40   BBTK_DECLARE_INPUT(PointsZ2,std::vector<int>);
41
42   /*Origin (starting point of the vector) of the second image, this is necesary for the translation matrix of a transform filter*/
43   BBTK_DECLARE_OUTPUT(Origin, std::vector<int>);
44
45   /*Origin (starting point of the vector) of the first image, this is necesary for the imageReslicer filter*/
46   BBTK_DECLARE_OUTPUT(OriginReslicer, std::vector<int>);
47   
48   /*The rotation axis (this axis is defined by the cross product of the 2 vectors)*/
49   BBTK_DECLARE_OUTPUT(TransformAxis, std::vector<double>);
50
51   
52   BBTK_DECLARE_OUTPUT(OutScaleX,int);
53   BBTK_DECLARE_OUTPUT(OutScaleY,int);
54   BBTK_DECLARE_OUTPUT(OutScaleZ,int);
55   BBTK_DECLARE_OUTPUT(OutAngle,double);
56   BBTK_PROCESS(Process);
57   void Process();
58
59   private:
60           VectorMath *_vector;
61 };
62
63 BBTK_BEGIN_DESCRIBE_BLACK_BOX(CalculateVectorBox,bbtk::AtomicBlackBox);
64 BBTK_NAME("CalculateVectorBox");
65 BBTK_AUTHOR("jn.trillos44@uniandes.edu.co");
66 BBTK_DESCRIPTION("Box for calculating the cross and point multiplications of 2 vectors");
67 BBTK_CATEGORY("__CATEGORY__");
68 BBTK_INPUT(CalculateVectorBox,PointsX1,"List of points in X for the first vector",std::vector<int>,"");
69 BBTK_INPUT(CalculateVectorBox,PointsX2,"List of points in X for the second vector",std::vector<int>,"");
70 BBTK_INPUT(CalculateVectorBox,PointsY1,"List of points in Y for the first vector",std::vector<int>,"");
71 BBTK_INPUT(CalculateVectorBox,PointsY2,"List of points in Y for the second vector",std::vector<int>,"");
72 BBTK_INPUT(CalculateVectorBox,PointsZ1,"List of points in Z for the first vector",std::vector<int>,"");
73 BBTK_INPUT(CalculateVectorBox,PointsZ2,"List of points in Z for the second vector",std::vector<int>,"");
74 BBTK_OUTPUT(CalculateVectorBox,Origin,"Points of Origin for the transformation",std::vector<int>,"");
75 BBTK_OUTPUT(CalculateVectorBox,OriginReslicer,"Points of Origin for the transformation for the Reslicer",std::vector<int>,"");
76 BBTK_OUTPUT(CalculateVectorBox,TransformAxis,"Axis used for the transformation (Result of Cross multiplication)",std::vector<double>,"");
77 BBTK_OUTPUT(CalculateVectorBox,OutScaleX,"Difference in scale for X for the cross multiplication",int,"");
78 BBTK_OUTPUT(CalculateVectorBox,OutScaleY,"Difference in scale for Y for the cross multiplication",int,"");
79 BBTK_OUTPUT(CalculateVectorBox,OutScaleZ,"Difference in scale for Z for the cross multiplication",int,"");
80 BBTK_OUTPUT(CalculateVectorBox,OutAngle,"Angle that represents the dot multiplication",double,"");
81 BBTK_END_DESCRIBE_BLACK_BOX(CalculateVectorBox);
82 }
83 // EO namespace bbPackRecalage
84
85 #endif // __bbPackRecalageCalculateVectorBox_h_INCLUDED__
86