#include "bbPackRecalageCalculateVectorBox.h" #include "bbPackRecalagePackage.h" #include namespace bbPackRecalage { BBTK_ADD_BLACK_BOX_TO_PACKAGE(PackRecalage,CalculateVectorBox) BBTK_BLACK_BOX_IMPLEMENTATION(CalculateVectorBox,bbtk::AtomicBlackBox); void CalculateVectorBox::Process() { if(!bbGetInputPointsX1().empty() && !bbGetInputPointsX2().empty()) { //Checks that all the vector points are defined if(bbGetInputPointsX1()[1] != NULL && bbGetInputPointsX2()[1] != NULL) { _vector->SetData(bbGetInputPointsX1(), bbGetInputPointsX2(), bbGetInputPointsY1(), bbGetInputPointsY2(), bbGetInputPointsZ1(), bbGetInputPointsZ2()); _vector->Run(); bbSetOutputOrigin(_vector->GetOrigin()); bbSetOutputOriginReslicer(_vector->GetOriginReslicer()); } } } void CalculateVectorBox::bbUserSetDefaultValues() { _vector = new VectorMath(); std::vector nullVector; bbSetInputPointsX1(nullVector); bbSetInputPointsX2(nullVector); } void CalculateVectorBox::bbUserInitializeProcessing() { // THE INITIALIZATION METHOD BODY : // Here does nothing // but this is where you should allocate the internal/output pointers // if any } void CalculateVectorBox::bbUserFinalizeProcessing() { // THE FINALIZATION METHOD BODY : // Here does nothing // but this is where you should desallocate the internal/output pointers // if any } } // EO namespace bbPackRecalage