]> Creatis software - creaRigidRegistration.git/blobdiff - PackRecalage/src/bbPackRecalageReSlicerBox.cxx
Feature #2010
[creaRigidRegistration.git] / PackRecalage / src / bbPackRecalageReSlicerBox.cxx
index 0d7fd540d2bef5153ef33be4bd38f02d49c2ae4b..29953b0481c3882fb7742b3943776ff83d6a86d5 100644 (file)
@@ -50,6 +50,8 @@ void ReSlicerBox::Process()
                slicer->SetInformationInput( image->GetOutput() );
                slicer->SetResliceTransform(bbGetInputTransform());
                slicer->SetOutputOrigin( -(bbGetInputOrigin()[0]) , -(bbGetInputOrigin()[1]) , -(bbGetInputOrigin()[2]) );
+
+
                if(bbGetInputInterpolate())
                {
                        slicer->InterpolateOn();
@@ -64,12 +66,28 @@ void ReSlicerBox::Process()
                imageResult->SetOutputOrigin( 0,0,0 ); 
        
                bbSetOutputOut( imageResult->GetOutput() );
+
+               if (bbGetInputTransform()!=NULL)
+               { 
+                  bbGetInputTransform()->Update();
+                  vtkMatrix4x4 *m = bbGetInputTransform()->GetMatrix();
+                  if (m!=NULL)
+                  {
+                    printf("EED ReSlicerBox::Process Translation %d %d %d \n",-(bbGetInputOrigin()[0]),-(bbGetInputOrigin()[1]),-(bbGetInputOrigin()[2]));
+                    printf("EED ReSlicerBox::Process Matrix %f %f %f %f\n", m->GetElement(0,0),m->GetElement(0,1),m->GetElement(0,2),m->GetElement(0,3));
+                    printf("EED ReSlicerBox::Process Matrix %f %f %f %f\n", m->GetElement(1,0),m->GetElement(1,1),m->GetElement(1,2),m->GetElement(1,3));
+                    printf("EED ReSlicerBox::Process Matrix %f %f %f %f\n", m->GetElement(2,0),m->GetElement(2,1),m->GetElement(2,2),m->GetElement(2,3));
+                    printf("EED ReSlicerBox::Process Matrix %f %f %f %f\n", m->GetElement(3,0),m->GetElement(3,1),m->GetElement(3,2),m->GetElement(3,3));
+                  } // if m 
+               } // if Transform
        }
        else
        {
                bbSetOutputOut( NULL );
        }  
 }
+
+
 void ReSlicerBox::bbUserSetDefaultValues()
 { 
        std::vector<int> empty;
@@ -81,6 +99,8 @@ void ReSlicerBox::bbUserSetDefaultValues()
        bbSetInputInterpolate(false);
   
 }
+
+
 void ReSlicerBox::bbUserInitializeProcessing()
 {
  
@@ -92,11 +112,13 @@ void ReSlicerBox::bbUserInitializeProcessing()
     slicer =vtkImageReslice::New();
        imageResult = vtkImageChangeInformation::New();
 }
+       
 void ReSlicerBox::bbUserFinalizeProcessing()
 { 
        image->Delete();
        slicer->Delete();
     imageResult->Delete();
 }
+
 }
 // EO namespace bbPackRecalage