From: tbaudier Date: Tue, 21 Mar 2017 16:24:44 +0000 (+0100) Subject: Take into account directions into clitk warp tool X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=commitdiff_plain;h=6aaeb77499e9c4c4cd419b9af53ef876c989a9a2;p=clitk.git Take into account directions into clitk warp tool --- 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());