]> Creatis software - creaRigidRegistration.git/blob - PackRecalage/src/bbPackRecalageCalculateVectorBox.cxx
*** empty log message ***
[creaRigidRegistration.git] / PackRecalage / src / bbPackRecalageCalculateVectorBox.cxx
1 #include "bbPackRecalageCalculateVectorBox.h"
2 #include "bbPackRecalagePackage.h"
3
4 #include <string>
5
6 namespace bbPackRecalage
7 {
8
9 BBTK_ADD_BLACK_BOX_TO_PACKAGE(PackRecalage,CalculateVectorBox)
10 BBTK_BLACK_BOX_IMPLEMENTATION(CalculateVectorBox,bbtk::AtomicBlackBox);
11 void CalculateVectorBox::Process()
12 {
13         
14         if(!bbGetInputPointsX1().empty() && !bbGetInputPointsX2().empty())
15         {
16                 //Checks that all the vector points are defined
17                 if(bbGetInputPointsX1()[1] != NULL && bbGetInputPointsX2()[1] != NULL)
18                 {
19                         _vector->SetData(bbGetInputPointsX1(), bbGetInputPointsX2(), bbGetInputPointsY1(), bbGetInputPointsY2(), bbGetInputPointsZ1(), bbGetInputPointsZ2());
20                         _vector->Run();
21
22                         bbSetOutputOrigin(_vector->GetOrigin());
23                         bbSetOutputOriginReslicer(_vector->GetOriginReslicer());
24                         bbSetOutputOutAngle(_vector->GetAngle());
25                 }
26         }
27 }
28 void CalculateVectorBox::bbUserSetDefaultValues()
29 {
30         _vector = new VectorMath();
31         std::vector<int> nullVector;
32         bbSetInputPointsX1(nullVector);
33         bbSetInputPointsX2(nullVector); 
34 }
35 void CalculateVectorBox::bbUserInitializeProcessing()
36 {
37  
38 //  THE INITIALIZATION METHOD BODY : 
39 //    Here does nothing  
40 //    but this is where you should allocate the internal/output pointers  
41 //    if any  
42  
43   
44 }
45 void CalculateVectorBox::bbUserFinalizeProcessing()
46 {
47  
48 //  THE FINALIZATION METHOD BODY : 
49 //    Here does nothing  
50 //    but this is where you should desallocate the internal/output pointers  
51 //    if any 
52   
53 }
54 }
55 // EO namespace bbPackRecalage
56
57