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 __bbPackRecalageTransform2DBox_h_INCLUDED__
28 #define __bbPackRecalageTransform2DBox_h_INCLUDED__
29 #include "bbPackRecalage_EXPORT.h"
30 #include "bbtkAtomicBlackBox.h"
33 #include "vtkLinearTransform.h"
34 #include "Transformer.h"
36 namespace bbPackRecalage
39 class bbPackRecalage_EXPORT Transform2DBox
41 public bbtk::AtomicBlackBox
43 BBTK_BLACK_BOX_INTERFACE(Transform2DBox,bbtk::AtomicBlackBox);
44 /*Point(x,y) -> Rotation Center*/
45 BBTK_DECLARE_INPUT(CenterPoint,std::vector<int>);
48 BBTK_DECLARE_INPUT(Angle,double);
51 /*Scalation to be done in the x axis*/
52 BBTK_DECLARE_INPUT(ScaleX,double);
55 /*Scalation to be done in the y axis*/
56 BBTK_DECLARE_INPUT(ScaleY,double);
58 /*Scalation to be done in the z axis*/
59 BBTK_DECLARE_INPUT(ScaleZ,double);
61 /*Resultant vtkTransform*/
62 BBTK_DECLARE_OUTPUT(Out, vtkTransform*);
64 BBTK_PROCESS(Process);
67 /*Class in charge of making the transformations*/
68 Transformer *transformer;
71 BBTK_BEGIN_DESCRIBE_BLACK_BOX(Transform2DBox,bbtk::AtomicBlackBox);
72 BBTK_NAME("Transform2DBox");
73 BBTK_AUTHOR("va-perez@uniandes.edu.co");
74 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");
75 BBTK_CATEGORY("filter");
76 BBTK_INPUT(Transform2DBox,CenterPoint,"Point (x,y,z) -> Rotation Center",std::vector<int>,"");
77 BBTK_INPUT(Transform2DBox,Angle,"Rotation Angle",double,"");
78 BBTK_INPUT(Transform2DBox,ScaleX,"Scale in X",double,"");
79 BBTK_INPUT(Transform2DBox,ScaleY,"Scale in Y",double,"");
80 BBTK_INPUT(Transform2DBox,ScaleZ,"Scale in Z",double,"");
81 BBTK_OUTPUT(Transform2DBox,Out,"Linear Transform filter",vtkTransform*,"");
82 BBTK_END_DESCRIBE_BLACK_BOX(Transform2DBox);
84 // EO namespace bbPackRecalage
86 #endif // __bbPackRecalageTransform2DBox_h_INCLUDED__