]> 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   /**/
46   BBTK_DECLARE_OUTPUT(OriginReslicer, std::vector<int>);
47   BBTK_DECLARE_OUTPUT(TransformAxis, std::vector<double>);
48   BBTK_DECLARE_OUTPUT(OutScaleX,int);
49   BBTK_DECLARE_OUTPUT(OutScaleY,int);
50   BBTK_DECLARE_OUTPUT(OutScaleZ,int);
51   BBTK_DECLARE_OUTPUT(OutAngle,double);
52   BBTK_PROCESS(Process);
53   void Process();
54
55   private:
56           VectorMath *_vector;
57 };
58
59 BBTK_BEGIN_DESCRIBE_BLACK_BOX(CalculateVectorBox,bbtk::AtomicBlackBox);
60 BBTK_NAME("CalculateVectorBox");
61 BBTK_AUTHOR("jn.trillos44@uniandes.edu.co");
62 BBTK_DESCRIPTION("Box for calculating the cross and point multiplications of 2 vectors");
63 BBTK_CATEGORY("__CATEGORY__");
64 BBTK_INPUT(CalculateVectorBox,PointsX1,"List of points in X for the first vector",std::vector<int>,"");
65 BBTK_INPUT(CalculateVectorBox,PointsX2,"List of points in X for the second vector",std::vector<int>,"");
66 BBTK_INPUT(CalculateVectorBox,PointsY1,"List of points in Y for the first vector",std::vector<int>,"");
67 BBTK_INPUT(CalculateVectorBox,PointsY2,"List of points in Y for the second vector",std::vector<int>,"");
68 BBTK_INPUT(CalculateVectorBox,PointsZ1,"List of points in Z for the first vector",std::vector<int>,"");
69 BBTK_INPUT(CalculateVectorBox,PointsZ2,"List of points in Z for the second vector",std::vector<int>,"");
70 BBTK_OUTPUT(CalculateVectorBox,Origin,"Points of Origin for the transformation",std::vector<int>,"");
71 BBTK_OUTPUT(CalculateVectorBox,OriginReslicer,"Points of Origin for the transformation for the Reslicer",std::vector<int>,"");
72 BBTK_OUTPUT(CalculateVectorBox,TransformAxis,"Axis used for the transformation (Result of Cross multiplication)",std::vector<double>,"");
73 BBTK_OUTPUT(CalculateVectorBox,OutScaleX,"Difference in scale for X for the cross multiplication",int,"");
74 BBTK_OUTPUT(CalculateVectorBox,OutScaleY,"Difference in scale for Y for the cross multiplication",int,"");
75 BBTK_OUTPUT(CalculateVectorBox,OutScaleZ,"Difference in scale for Z for the cross multiplication",int,"");
76 BBTK_OUTPUT(CalculateVectorBox,OutAngle,"Angle that represents the dot multiplication",double,"");
77 BBTK_END_DESCRIBE_BLACK_BOX(CalculateVectorBox);
78 }
79 // EO namespace bbPackRecalage
80
81 #endif // __bbPackRecalageCalculateVectorBox_h_INCLUDED__
82