]> Creatis software - clitk.git/blobdiff - tools/clitkWarpImageGenericFilter.txx
cosmetic for .ggo
[clitk.git] / tools / clitkWarpImageGenericFilter.txx
index d1d1f714f3a76b46978fd0e9f3335740c1006a2c..84bfbaaec7148cc5f133180c3b5290ca608eb491 100644 (file)
@@ -132,6 +132,7 @@ WarpImageGenericFilter::UpdateWithDimAndPixelType()
     resampler =itk::VectorResampleImageFilter<DeformationFieldType, DeformationFieldType >::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<DeformationFieldType, DeformationFieldType >::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<DeformationFieldType, DeformationFieldType >::Pointer
     resampler =itk::VectorResampleImageFilter<DeformationFieldType, DeformationFieldType >::New();
     backwardWarpFilter->SetInterpolator(genericInterpolator->GetInterpolatorPointer());