]> Creatis software - creaRigidRegistration.git/blob - PackRecalage/src/bbPackRecalageTransform2DBox.h
52288f8b00deb008049448d6bb7b994811d07f8f
[creaRigidRegistration.git] / PackRecalage / src / bbPackRecalageTransform2DBox.h
1 #ifndef __bbPackRecalageTransform2DBox_h_INCLUDED__
2 #define __bbPackRecalageTransform2DBox_h_INCLUDED__
3 #include "bbPackRecalage_EXPORT.h"
4 #include "bbtkAtomicBlackBox.h"
5 #include "iostream"
6
7 #include "vtkLinearTransform.h"
8 #include "Transformer.h"
9
10 namespace bbPackRecalage
11 {
12
13 class bbPackRecalage_EXPORT Transform2DBox
14  : 
15    public bbtk::AtomicBlackBox
16 {
17                 BBTK_BLACK_BOX_INTERFACE(Transform2DBox,bbtk::AtomicBlackBox);
18                 /*Point(x,y) -> Rotation Center*/
19                 BBTK_DECLARE_INPUT(CenterPoint,std::vector<int>);
20
21                 /*Vector(x,y) -> Axis Rotation Vector*/
22                 BBTK_DECLARE_INPUT(Axis,std::vector<double>);
23
24
25                 /*Rotation angle*/
26                 BBTK_DECLARE_INPUT(Angle,double);
27
28                 
29                 /*Scalation to be done int the x axis*/
30                 BBTK_DECLARE_INPUT(ScaleX,double);
31
32                 
33                 /*Scalation to be done int the y axis*/
34                 BBTK_DECLARE_INPUT(ScaleY,double);
35
36                 /*Scalation to be done int the z axis*/
37                 BBTK_DECLARE_INPUT(ScaleZ,double);
38
39                 /*3D transformation on or off option*/
40                 BBTK_DECLARE_INPUT(3D,bool);
41                 
42                 /*Resultant vtkTransform*/
43                 BBTK_DECLARE_OUTPUT(Out, vtkLinearTransform*);
44
45                 BBTK_PROCESS(Process);
46                 void Process();
47                 
48                 /*Class in charge of making the transformations*/
49                 Transformer *transformer;
50
51                 /*Boolean that defines if the transformation is in 3D or not. True = Transfomation is in 3D*/
52                 bool _3D;
53 };
54
55 BBTK_BEGIN_DESCRIBE_BLACK_BOX(Transform2DBox,bbtk::AtomicBlackBox);
56 BBTK_NAME("Transform2DBox");
57 BBTK_AUTHOR("va-perez@uniandes.edu.co");
58 BBTK_DESCRIPTION("Given 2 points and an angle, it calculates the vtkTransform result after aplying the transformations, using the first point as base of the transformation");
59 BBTK_CATEGORY("filter");
60 BBTK_INPUT(Transform2DBox,CenterPoint,"Point (x,y,z) -> Rotation Center",std::vector<int>,"");
61 BBTK_INPUT(Transform2DBox,Axis,"Vector (x,y,z) -> Axis Rotation Vector. Used only on 3D transformations.",std::vector<double>,"");
62 BBTK_INPUT(Transform2DBox,Angle,"Rotation Angle",double,"");
63 BBTK_INPUT(Transform2DBox,ScaleX,"Scale in X",double,"");
64 BBTK_INPUT(Transform2DBox,ScaleY,"Scale in Y",double,"");
65 BBTK_INPUT(Transform2DBox,ScaleZ,"Scale in Z",double,"");
66 BBTK_INPUT(Transform2DBox,3D,"Boolean that defines if the transformation is in 3D or not. True = Transfomation is in 3D ",bool,"");
67 BBTK_OUTPUT(Transform2DBox,Out,"Linear Transform filter",vtkLinearTransform*,"");
68 BBTK_END_DESCRIBE_BLACK_BOX(Transform2DBox);
69 }
70 // EO namespace bbPackRecalage
71
72 #endif // __bbPackRecalageTransform2DBox_h_INCLUDED__
73