From 6aaeb77499e9c4c4cd419b9af53ef876c989a9a2 Mon Sep 17 00:00:00 2001 From: tbaudier Date: Tue, 21 Mar 2017 17:24:44 +0100 Subject: [PATCH] Take into account directions into clitk warp tool --- tools/clitkWarpImageGenericFilter.txx | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tools/clitkWarpImageGenericFilter.txx b/tools/clitkWarpImageGenericFilter.txx index d1d1f71..84bfbaa 100644 --- a/tools/clitkWarpImageGenericFilter.txx +++ b/tools/clitkWarpImageGenericFilter.txx @@ -132,6 +132,7 @@ WarpImageGenericFilter::UpdateWithDimAndPixelType() resampler =itk::VectorResampleImageFilter::New(); resampler->SetInput(deformationField); resampler->SetOutputSpacing(deformationField->GetSpacing()); + resampler->SetOutputDirection(deformationField->GetDirection()); resampler->SetSize(newSize); resampler->SetOutputOrigin(input->GetOrigin()); resampler->SetInterpolator(genericInterpolator->GetInterpolatorPointer()); @@ -163,6 +164,7 @@ WarpImageGenericFilter::UpdateWithDimAndPixelType() resampler =itk::VectorResampleImageFilter::New(); resampler->SetInput(deformationField); resampler->SetOutputSpacing(input->GetSpacing()); + resampler->SetOutputDirection(deformationField->GetDirection()); resampler->SetSize(newSize); resampler->SetOutputOrigin(input->GetOrigin()); resampler->SetInterpolator(genericInterpolator->GetInterpolatorPointer()); @@ -210,6 +212,7 @@ WarpImageGenericFilter::UpdateWithDimAndPixelType() backwardWarpFilter->SetOutputSpacing( deformationField->GetSpacing() ); backwardWarpFilter->SetOutputOrigin( input->GetOrigin() ); backwardWarpFilter->SetOutputSize( deformationField->GetLargestPossibleRegion().GetSize() ); + backwardWarpFilter->SetOutputDirection( input->GetDirection() ); typename itk::VectorResampleImageFilter::Pointer resampler =itk::VectorResampleImageFilter::New(); backwardWarpFilter->SetInterpolator(genericInterpolator->GetInterpolatorPointer()); -- 2.47.1