]> Creatis software - creaRigidRegistration.git/blobdiff - PackRecalage/src/bbPackRecalageTransform2DBox.cxx
*** empty log message ***
[creaRigidRegistration.git] / PackRecalage / src / bbPackRecalageTransform2DBox.cxx
index 6a7bd1b71d78430833b5b468cad00e3709676376..ce988d94a2f2399c9ddd4fcca792bbc324933d3b 100644 (file)
@@ -7,7 +7,7 @@ BBTK_ADD_BLACK_BOX_TO_PACKAGE(PackRecalage,Transform2DBox)
 BBTK_BLACK_BOX_IMPLEMENTATION(Transform2DBox,bbtk::AtomicBlackBox);
 void Transform2DBox::Process()
 {
-               if(bbGetInputCenterPoint()[0])
+       if(!bbGetInputCenterPoint().empty())
                {
                        //      The inputs are set in the library transformer
                        transformer->SetCenterPoint( bbGetInputCenterPoint() );
@@ -15,8 +15,15 @@ void Transform2DBox::Process()
                        transformer->SetScaleX( bbGetInputScaleX() );
                        transformer->SetScaleY( bbGetInputScaleY() );
                        transformer->SetScaleZ( bbGetInputScaleZ() );
+
+                       //If 3D, make extra preparations
+                       if(_3D)
+                       {
+                               transformer->SetAxis(bbGetInputAxis());
+                       }
+
                        // The calculation of the transformations are made
-                       transformer->Run();
+                       transformer->Run(_3D);
                        // We get the results of transformer and set it as result of this box
                        bbSetOutputOut( transformer->GetResult() );                     
                }
@@ -36,7 +43,8 @@ void Transform2DBox::bbUserSetDefaultValues()
                bbSetInputScaleX(100);
                bbSetInputScaleY(100);
                bbSetInputScaleZ(100);
-               bbSetOutputOut(NULL);   
+               bbSetOutputOut(NULL);
+               _3D = false;
   
 }
 void Transform2DBox::bbUserInitializeProcessing()