1 #ifndef __bbPackRecalageCalculateVectorBox_h_INCLUDED__
2 #define __bbPackRecalageCalculateVectorBox_h_INCLUDED__
3 #include "bbPackRecalage_EXPORT.h"
4 #include "bbtkAtomicBlackBox.h"
7 #include "VectorMath.h"
9 namespace bbPackRecalage
12 class bbPackRecalage_EXPORT CalculateVectorBox
14 public bbtk::AtomicBlackBox
16 BBTK_BLACK_BOX_INTERFACE(CalculateVectorBox,bbtk::AtomicBlackBox);
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>);
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>);
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>);
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>);
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>);
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>);
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>);
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>);
48 /*The rotation axis (this axis is defined by the cross product of the 2 vectors)*/
49 BBTK_DECLARE_OUTPUT(TransformAxis, std::vector<double>);
51 /*Scale difference in X*/
52 BBTK_DECLARE_OUTPUT(OutScaleX,int);
54 /*Scale difference in Y*/
55 BBTK_DECLARE_OUTPUT(OutScaleY,int);
57 /*Scale difference in Z*/
58 BBTK_DECLARE_OUTPUT(OutScaleZ,int);
61 BBTK_DECLARE_OUTPUT(OutAngle,double);
62 BBTK_PROCESS(Process);
70 BBTK_BEGIN_DESCRIBE_BLACK_BOX(CalculateVectorBox,bbtk::AtomicBlackBox);
71 BBTK_NAME("CalculateVectorBox");
72 BBTK_AUTHOR("jn.trillos44@uniandes.edu.co");
73 BBTK_DESCRIPTION("Box for calculating the cross and point multiplications of 2 vectors");
74 BBTK_CATEGORY("__CATEGORY__");
75 BBTK_INPUT(CalculateVectorBox,PointsX1,"List of points in X for the first vector",std::vector<int>,"");
76 BBTK_INPUT(CalculateVectorBox,PointsX2,"List of points in X for the second vector",std::vector<int>,"");
77 BBTK_INPUT(CalculateVectorBox,PointsY1,"List of points in Y for the first vector",std::vector<int>,"");
78 BBTK_INPUT(CalculateVectorBox,PointsY2,"List of points in Y for the second vector",std::vector<int>,"");
79 BBTK_INPUT(CalculateVectorBox,PointsZ1,"List of points in Z for the first vector",std::vector<int>,"");
80 BBTK_INPUT(CalculateVectorBox,PointsZ2,"List of points in Z for the second vector",std::vector<int>,"");
81 BBTK_OUTPUT(CalculateVectorBox,Origin,"Points of Origin for the transformation",std::vector<int>,"");
82 BBTK_OUTPUT(CalculateVectorBox,OriginReslicer,"Points of Origin for the transformation for the Reslicer",std::vector<int>,"");
83 BBTK_OUTPUT(CalculateVectorBox,TransformAxis,"Axis used for the transformation (Result of Cross multiplication)",std::vector<double>,"");
84 BBTK_OUTPUT(CalculateVectorBox,OutScaleX,"Difference in scale for X for the cross multiplication",int,"");
85 BBTK_OUTPUT(CalculateVectorBox,OutScaleY,"Difference in scale for Y for the cross multiplication",int,"");
86 BBTK_OUTPUT(CalculateVectorBox,OutScaleZ,"Difference in scale for Z for the cross multiplication",int,"");
87 BBTK_OUTPUT(CalculateVectorBox,OutAngle,"Angle that represents the dot multiplication",double,"");
88 BBTK_END_DESCRIBE_BLACK_BOX(CalculateVectorBox);
90 // EO namespace bbPackRecalage
92 #endif // __bbPackRecalageCalculateVectorBox_h_INCLUDED__