]> Creatis software - creaRigidRegistration.git/blobdiff - PackRecalage/src/bbPackRecalageCalculateVectorBox.cxx
*** empty log message ***
[creaRigidRegistration.git] / PackRecalage / src / bbPackRecalageCalculateVectorBox.cxx
index 0290fcef7363e675eca122c7fdff9eef3c3a5830..675e176a14624f56b943eba1e408657427e2f967 100644 (file)
@@ -11,23 +11,21 @@ BBTK_BLACK_BOX_IMPLEMENTATION(CalculateVectorBox,bbtk::AtomicBlackBox);
 void CalculateVectorBox::Process()
 {
        
-    if(bbGetInputLabels1()[0].compare("") != 0)
+       if(!bbGetInputPointsX1().empty() && !bbGetInputPointsX2().empty())
        {
-               //std::vector<float> newX1;
-               //newX1.push_back((float)bbGetInputPointsX1()[0]);
-               std::cout << "Points for first vector: " << bbGetInputPointsX1()[0] << " " << bbGetInputPointsX1()[1] << std::endl;
-               //std::vector<float> newX2;
-               //newX2.push_back((float)bbGetInputPointsX2()[0]);
+               _vector->SetData(bbGetInputPointsX1(), bbGetInputPointsX2(), bbGetInputPointsY1(), bbGetInputPointsY2(), bbGetInputPointsZ1(), bbGetInputPointsZ2());
+               _vector->Run();
+
+               bbSetOutputOrigin(_vector->GetOrigin());
+               bbSetOutputOriginReslicer(_vector->GetOriginReslicer());
        }
 }
 void CalculateVectorBox::bbUserSetDefaultValues()
 {
-//  SET HERE THE DEFAULT INPUT/OUTPUT VALUES OF YOUR BOX  
-//    Here we initialize the input 'In' to 0 
-       /*
-       std::vector<std::string> nuevo("","");
-       bbSetInputLabels1(nuevo);*/
+       _vector = new VectorMath();
+       std::vector<int> nullVector;
+       bbSetInputPointsX1(nullVector);
+       bbSetInputPointsX2(nullVector); 
 }
 void CalculateVectorBox::bbUserInitializeProcessing()
 {