From 92044073d6c8ff23ca0ebb8664e46c0a8cf86ea0 Mon Sep 17 00:00:00 2001 From: tbaudier Date: Tue, 26 Sep 2017 11:26:02 +0200 Subject: [PATCH] Reslice with correct spacing --- vv/vvSlicer.cxx | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/vv/vvSlicer.cxx b/vv/vvSlicer.cxx index 10396a6..bcfbbfc 100644 --- a/vv/vvSlicer.cxx +++ b/vv/vvSlicer.cxx @@ -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 -- 2.47.1