]> 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                 _vector->SetData(bbGetInputPointsX1(), bbGetInputPointsX2(), bbGetInputPointsY1(), bbGetInputPointsY2(), bbGetInputPointsZ1(), bbGetInputPointsZ2());
17                 _vector->Run();
18
19                 bbSetOutputOrigin(_vector->GetOrigin());
20                 bbSetOutputOriginReslicer(_vector->GetOriginReslicer());
21         }
22 }
23 void CalculateVectorBox::bbUserSetDefaultValues()
24 {
25         _vector = new VectorMath();
26         std::vector<int> nullVector;
27         bbSetInputPointsX1(nullVector);
28         bbSetInputPointsX2(nullVector); 
29 }
30 void CalculateVectorBox::bbUserInitializeProcessing()
31 {
32  
33 //  THE INITIALIZATION METHOD BODY : 
34 //    Here does nothing  
35 //    but this is where you should allocate the internal/output pointers  
36 //    if any  
37  
38   
39 }
40 void CalculateVectorBox::bbUserFinalizeProcessing()
41 {
42  
43 //  THE FINALIZATION METHOD BODY : 
44 //    Here does nothing  
45 //    but this is where you should desallocate the internal/output pointers  
46 //    if any 
47   
48 }
49 }
50 // EO namespace bbPackRecalage
51
52