2 # ---------------------------------------------------------------------
4 # Copyright (c) CREATIS (Centre de Recherche en Acquisition et Traitement de l'Image
6 # Authors : Eduardo Davila, Frederic Cervenansky, Claire Mouton
8 # This software is governed by the CeCILL-B license under French law and
9 # abiding by the rules of distribution of free software. You can use,
10 # modify and/ or redistribute the software under the terms of the CeCILL-B
11 # license as circulated by CEA, CNRS and INRIA at the following URL
12 # http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html
13 # or in the file LICENSE.txt.
15 # As a counterpart to the access to the source code and rights to copy,
16 # modify and redistribute granted by the license, users are provided only
17 # with a limited warranty and the software's author, the holder of the
18 # economic rights, and the successive licensors have only limited
21 # The fact that you are presently reading this means that you have had
22 # knowledge of the CeCILL-B license and that you accept its terms.
23 # ------------------------------------------------------------------------
27 #ifndef __bbPackRecalageCalculateVectorBox_h_INCLUDED__
28 #define __bbPackRecalageCalculateVectorBox_h_INCLUDED__
29 #include "bbPackRecalage_EXPORT.h"
30 #include "bbtkAtomicBlackBox.h"
33 #include "PlanesOperations.h"
35 namespace bbPackRecalage
38 class bbPackRecalage_EXPORT CalculateVectorBox
40 public bbtk::AtomicBlackBox
42 BBTK_BLACK_BOX_INTERFACE(CalculateVectorBox,bbtk::AtomicBlackBox);
44 /*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
45 and "b" the position in X for the ending point of the vector */
46 BBTK_DECLARE_INPUT(PointsX1,std::vector<int>);
48 /*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
49 and "b" the position in X for the ending point of the vector */
50 BBTK_DECLARE_INPUT(PointsX2,std::vector<int>);
52 /*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
53 and "b" the position in Y for the ending point of the vector */
54 BBTK_DECLARE_INPUT(PointsY1,std::vector<int>);
56 /*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
57 and "b" the position in Y for the ending point of the vector */
58 BBTK_DECLARE_INPUT(PointsY2,std::vector<int>);
60 /*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
61 and "b" the position in Z for the ending point of the vector */
62 BBTK_DECLARE_INPUT(PointsZ1,std::vector<int>);
64 /*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
65 and "b" the position in Z for the ending point of the vector */
66 BBTK_DECLARE_INPUT(PointsZ2,std::vector<int>);
68 /*Origin (starting point of the vector) of the second image, this is necesary for the translation matrix of a transform filter*/
69 BBTK_DECLARE_OUTPUT(Origin, std::vector<int>);
71 /*Origin (starting point of the vector) of the first image, this is necesary for the imageReslicer filter*/
72 BBTK_DECLARE_OUTPUT(OriginReslicer, std::vector<int>);
74 /*The rotation axis (this axis is defined by the cross product of the 2 vectors)*/
75 BBTK_DECLARE_OUTPUT(TransformAxis, std::vector<double>);
77 /*Scale difference in X*/
78 BBTK_DECLARE_OUTPUT(OutScaleX,int);
80 /*Scale difference in Y*/
81 BBTK_DECLARE_OUTPUT(OutScaleY,int);
83 /*Scale difference in Z*/
84 BBTK_DECLARE_OUTPUT(OutScaleZ,int);
87 BBTK_DECLARE_OUTPUT(OutAngle,double);
88 BBTK_PROCESS(Process);
93 PlanesOperations *_vector;
96 BBTK_BEGIN_DESCRIBE_BLACK_BOX(CalculateVectorBox,bbtk::AtomicBlackBox);
97 BBTK_NAME("CalculateVectorBox");
98 BBTK_AUTHOR("jn.trillos44@uniandes.edu.co");
99 BBTK_DESCRIPTION("Box for calculating the cross and point multiplications of 2 vectors");
100 BBTK_CATEGORY("__CATEGORY__");
101 BBTK_INPUT(CalculateVectorBox,PointsX1,"List of points in X for the first vector",std::vector<int>,"");
102 BBTK_INPUT(CalculateVectorBox,PointsX2,"List of points in X for the second vector",std::vector<int>,"");
103 BBTK_INPUT(CalculateVectorBox,PointsY1,"List of points in Y for the first vector",std::vector<int>,"");
104 BBTK_INPUT(CalculateVectorBox,PointsY2,"List of points in Y for the second vector",std::vector<int>,"");
105 BBTK_INPUT(CalculateVectorBox,PointsZ1,"List of points in Z for the first vector",std::vector<int>,"");
106 BBTK_INPUT(CalculateVectorBox,PointsZ2,"List of points in Z for the second vector",std::vector<int>,"");
107 BBTK_OUTPUT(CalculateVectorBox,Origin,"Points of Origin for the transformation",std::vector<int>,"");
108 BBTK_OUTPUT(CalculateVectorBox,OriginReslicer,"Points of Origin for the transformation for the Reslicer",std::vector<int>,"");
109 BBTK_OUTPUT(CalculateVectorBox,TransformAxis,"Axis used for the transformation (Result of Cross multiplication)",std::vector<double>,"");
110 BBTK_OUTPUT(CalculateVectorBox,OutScaleX,"Difference in scale for X for the cross multiplication",int,"");
111 BBTK_OUTPUT(CalculateVectorBox,OutScaleY,"Difference in scale for Y for the cross multiplication",int,"");
112 BBTK_OUTPUT(CalculateVectorBox,OutScaleZ,"Difference in scale for Z for the cross multiplication",int,"");
113 BBTK_OUTPUT(CalculateVectorBox,OutAngle,"Angle that represents the dot multiplication",double,"");
114 BBTK_END_DESCRIBE_BLACK_BOX(CalculateVectorBox);
116 // EO namespace bbPackRecalage
118 #endif // __bbPackRecalageCalculateVectorBox_h_INCLUDED__