]> Creatis software - creaRigidRegistration.git/blob - PackRecalage/src/bbPackRecalageTransform2DBox.h
Feature #1766 Add licence terms for all files.
[creaRigidRegistration.git] / PackRecalage / src / bbPackRecalageTransform2DBox.h
1 /*
2 # ---------------------------------------------------------------------
3 #
4 # Copyright (c) CREATIS (Centre de Recherche en Acquisition et Traitement de l'Image 
5 #                        pour la Santé)
6 # Authors : Eduardo Davila, Frederic Cervenansky, Claire Mouton
7 #
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.
14 #
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
19 #  liability. 
20 #
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 # ------------------------------------------------------------------------   
24 */
25
26
27 #ifndef __bbPackRecalageTransform2DBox_h_INCLUDED__
28 #define __bbPackRecalageTransform2DBox_h_INCLUDED__
29 #include "bbPackRecalage_EXPORT.h"
30 #include "bbtkAtomicBlackBox.h"
31 #include "iostream"
32
33 #include "vtkLinearTransform.h"
34 #include "Transformer.h"
35
36 namespace bbPackRecalage
37 {
38
39 class bbPackRecalage_EXPORT Transform2DBox
40  : 
41    public bbtk::AtomicBlackBox
42 {
43                 BBTK_BLACK_BOX_INTERFACE(Transform2DBox,bbtk::AtomicBlackBox);
44                 /*Point(x,y) -> Rotation Center*/
45                 BBTK_DECLARE_INPUT(CenterPoint,std::vector<int>);
46
47                 /*Rotation angle*/
48                 BBTK_DECLARE_INPUT(Angle,double);
49
50                 
51                 /*Scalation to be done in the x axis*/
52                 BBTK_DECLARE_INPUT(ScaleX,double);
53
54                 
55                 /*Scalation to be done in the y axis*/
56                 BBTK_DECLARE_INPUT(ScaleY,double);
57
58                 /*Scalation to be done in the z axis*/
59                 BBTK_DECLARE_INPUT(ScaleZ,double);
60
61                 /*Resultant vtkTransform*/
62                 BBTK_DECLARE_OUTPUT(Out, vtkTransform*);
63
64                 BBTK_PROCESS(Process);
65                 void Process();
66                 
67                 /*Class in charge of making the transformations*/
68                 Transformer *transformer;               
69 };
70
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);
83 }
84 // EO namespace bbPackRecalage
85
86 #endif // __bbPackRecalageTransform2DBox_h_INCLUDED__
87