]> Creatis software - clitk.git/commitdiff
Reslice with correct spacing
authortbaudier <thomas.baudier@creatis.insa-lyon.fr>
Tue, 26 Sep 2017 09:26:02 +0000 (11:26 +0200)
committertbaudier <thomas.baudier@creatis.insa-lyon.fr>
Tue, 26 Sep 2017 09:26:02 +0000 (11:26 +0200)
vv/vvSlicer.cxx

index 10396a6a94fe5f29200d5ccb4e340a372a21364f..bcfbbfc0145fa6cc2d8faa3d370726380255761b 100644 (file)
@@ -359,8 +359,7 @@ void vvSlicer::SetImage(vvImage::Pointer image)
     mConcatenatedTransform->Identity();
     mConcatenatedTransform->Concatenate(mImage->GetTransform()[0]);
     mConcatenatedTransform->Concatenate(mSlicingTransform);
-    mImageReslice->SetResliceTransform(mConcatenatedTransform);
-    //mImageReslice->SetResliceAxes(mConcatenatedTransform->GetMatrix());
+    mImageReslice->SetResliceAxes(mConcatenatedTransform->GetMatrix());
 #if VTK_MAJOR_VERSION <= 5
     mImageReslice->SetInput(0, mImage->GetFirstVTKImageData());
 #else
@@ -378,8 +377,7 @@ void vvSlicer::SetImage(vvImage::Pointer image)
 #if VTK_MAJOR_VERSION <= 5
     this->GetInput()->GetWholeExtent(extent);
 #else
-    int* ext = mImageReslice->GetInputInformation()->Get(vtkStreamingDemandDrivenPipeline::WHOLE_EXTENT());
-    copyExtent(ext, extent);
+    mImageReslice->GetOutput()->GetExtent(extent);
 #endif
 
     // Prevent crash when reload -> change slice if outside extent