From 8860f160965cb8265706d8edfedfe5a1cc75450a Mon Sep 17 00:00:00 2001 From: David Sarrut Date: Tue, 28 Jan 2014 16:19:34 +0100 Subject: [PATCH] Take input/output spacing for origin --- itk/clitkResampleImageWithOptionsFilter.txx | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/itk/clitkResampleImageWithOptionsFilter.txx b/itk/clitkResampleImageWithOptionsFilter.txx index e009e38..4c949ce 100644 --- a/itk/clitkResampleImageWithOptionsFilter.txx +++ b/itk/clitkResampleImageWithOptionsFilter.txx @@ -229,10 +229,9 @@ GenerateData() } // Compute origin based on image corner - typename FilterType::OriginPointType origin = input->GetOrigin(); for(unsigned int i=0; iGetSpacing()[i]; - origin[i] += 0.5 * m_OutputSpacing[i]; + m_OutputOrigin[i] -= 0.5 * input->GetSpacing()[i]; + m_OutputOrigin[i] += 0.5 * m_OutputSpacing[i]; } // Instance of the transform object to be passed to the resample -- 2.47.1