]> Creatis software - creaRigidRegistration.git/blob - PackRecalage/src/bbPackRecalageCalculateVectorBox.cxx
Added Image Recalage Properties
[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                 }
25         }
26 }
27 void CalculateVectorBox::bbUserSetDefaultValues()
28 {
29         _vector = new VectorMath();
30         std::vector<int> nullVector;
31         bbSetInputPointsX1(nullVector);
32         bbSetInputPointsX2(nullVector); 
33 }
34 void CalculateVectorBox::bbUserInitializeProcessing()
35 {
36  
37 //  THE INITIALIZATION METHOD BODY : 
38 //    Here does nothing  
39 //    but this is where you should allocate the internal/output pointers  
40 //    if any  
41  
42   
43 }
44 void CalculateVectorBox::bbUserFinalizeProcessing()
45 {
46  
47 //  THE FINALIZATION METHOD BODY : 
48 //    Here does nothing  
49 //    but this is where you should desallocate the internal/output pointers  
50 //    if any 
51   
52 }
53 }
54 // EO namespace bbPackRecalage
55
56