]> Creatis software - creaRigidRegistration.git/blob - PackRecalage/src/bbPackRecalageTransform3D2PointsBox.h
Feature #1766 Add licence terms for all files.
[creaRigidRegistration.git] / PackRecalage / src / bbPackRecalageTransform3D2PointsBox.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 __bbPackRecalageTransform3D2PointsBox_h_INCLUDED__
28 #define __bbPackRecalageTransform3D2PointsBox_h_INCLUDED__
29 #include "bbPackRecalage_EXPORT.h"
30 #include "bbtkAtomicBlackBox.h"
31 #include "iostream"
32 #include "Transformer3D.h"
33 #include "vtkLinearTransform.h"
34 #include "vtkMath.h"
35 #include "PlanesOperations.h"
36
37 namespace bbPackRecalage
38 {
39
40 class bbPackRecalage_EXPORT Transform3D2PointsBox
41  : 
42    public bbtk::AtomicBlackBox
43 {
44   BBTK_BLACK_BOX_INTERFACE(Transform3D2PointsBox,bbtk::AtomicBlackBox);
45
46   /*Points in X*/
47   BBTK_DECLARE_INPUT(InX1,std::vector<int>);
48
49   /*Points in Y*/
50   BBTK_DECLARE_INPUT(InY1,std::vector<int>);
51
52   /*Points in Z*/
53   BBTK_DECLARE_INPUT(InZ1,std::vector<int>);
54
55   /*Points in X*/
56   BBTK_DECLARE_INPUT(InX2,std::vector<int>);
57
58   /*Points in Y*/
59   BBTK_DECLARE_INPUT(InY2,std::vector<int>);
60
61   /*Points in Z*/
62   BBTK_DECLARE_INPUT(InZ2,std::vector<int>);
63
64   /*Labels of points*/
65   BBTK_DECLARE_INPUT(Labels1,std::vector<std::string>);
66   /*Labels of points*/
67   BBTK_DECLARE_INPUT(Labels2,std::vector<std::string>);
68
69   /*Second angle*/
70   BBTK_DECLARE_INPUT(SecondAngle,double);
71
72   /*Resultant vtkTransform*/
73   BBTK_DECLARE_OUTPUT(Out, vtkTransform*);
74   
75   BBTK_PROCESS(Process);
76   void Process();
77
78   /*Class in charge of making the transformations*/
79   Transformer3D *transformer;
80
81   /*Class that does the vector operations*/
82   PlanesOperations *planes;
83 };
84
85 BBTK_BEGIN_DESCRIBE_BLACK_BOX(Transform3D2PointsBox,bbtk::AtomicBlackBox);
86 BBTK_NAME("Transform3D2PointsBox");
87 BBTK_AUTHOR("jn.trillos44@uniandes.edu.co");
88 BBTK_DESCRIPTION("Box useful for creating matrixes for 3D transformations defined by 2 points");
89 BBTK_CATEGORY("image");
90 BBTK_INPUT(Transform3D2PointsBox,InX1,"Points in X (first image)",std::vector<int>,"");
91 BBTK_INPUT(Transform3D2PointsBox,InY1,"Points in Y (first image)",std::vector<int>,"");
92 BBTK_INPUT(Transform3D2PointsBox,InZ1,"Points in Z (first image)",std::vector<int>,"");
93 BBTK_INPUT(Transform3D2PointsBox,InX2,"Points in X (second image)",std::vector<int>,"");
94 BBTK_INPUT(Transform3D2PointsBox,InY2,"Points in Y (second image)",std::vector<int>,"");
95 BBTK_INPUT(Transform3D2PointsBox,InZ2,"Points in Z (second image)",std::vector<int>,"");
96 BBTK_INPUT(Transform3D2PointsBox,SecondAngle,"Rotation to be done in second axis",double,"");
97 BBTK_INPUT(Transform3D2PointsBox,Labels1,"Labels of the points (first image)",std::vector<std::string>,"");
98 BBTK_INPUT(Transform3D2PointsBox,Labels2,"Labels of the points (second image)",std::vector<std::string>,"");
99 BBTK_OUTPUT(Transform3D2PointsBox,Out,"Transformation Matrix",vtkTransform*,"");
100 BBTK_END_DESCRIBE_BLACK_BOX(Transform3D2PointsBox);
101 }
102 // EO namespace bbPackRecalage
103
104 #endif // __bbPackRecalageTransform3DBox_h_INCLUDED__
105