1 #ifndef __bbPackRecalageTransform2DBox_h_INCLUDED__
2 #define __bbPackRecalageTransform2DBox_h_INCLUDED__
3 #include "bbPackRecalage_EXPORT.h"
4 #include "bbtkAtomicBlackBox.h"
7 #include "vtkLinearTransform.h"
8 #include "Transformer.h"
10 namespace bbPackRecalage
13 class bbPackRecalage_EXPORT Transform2DBox
15 public bbtk::AtomicBlackBox
17 BBTK_BLACK_BOX_INTERFACE(Transform2DBox,bbtk::AtomicBlackBox);
18 /*Point(x,y) -> Rotation Center*/
19 BBTK_DECLARE_INPUT(CenterPoint,std::vector<int>);
21 /*Vector(x,y) -> Axis Rotation Vector*/
22 BBTK_DECLARE_INPUT(Axis,std::vector<double>);
26 BBTK_DECLARE_INPUT(Angle,double);
29 /*Scalation to be done int the x axis*/
30 BBTK_DECLARE_INPUT(ScaleX,double);
33 /*Scalation to be done int the y axis*/
34 BBTK_DECLARE_INPUT(ScaleY,double);
36 /*Scalation to be done int the z axis*/
37 BBTK_DECLARE_INPUT(ScaleZ,double);
39 /*3D transformation on or off option*/
40 BBTK_DECLARE_INPUT(3D,bool);
42 /*Resultant vtkTransform*/
43 BBTK_DECLARE_OUTPUT(Out, vtkLinearTransform*);
45 BBTK_PROCESS(Process);
48 /*Class in charge of making the transformations*/
49 Transformer *transformer;
51 /*Boolean that defines if the transformation is in 3D or not. True = Transfomation is in 3D*/
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);
70 // EO namespace bbPackRecalage
72 #endif // __bbPackRecalageTransform2DBox_h_INCLUDED__