X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=tools%2FclitkWarpImageGenericFilter.txx;h=84bfbaaec7148cc5f133180c3b5290ca608eb491;hb=f48c960aef6e0a5a4edea516b062197db009e25f;hp=d1d1f714f3a76b46978fd0e9f3335740c1006a2c;hpb=c45f077f35553cdc72396626ac601080093d273b;p=clitk.git 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());