From: David Sarrut Date: Tue, 28 Jan 2014 15:19:34 +0000 (+0100) Subject: Take input/output spacing for origin X-Git-Tag: v1.4.0~136 X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=commitdiff_plain;h=8860f160965cb8265706d8edfedfe5a1cc75450a;p=clitk.git Take input/output spacing for origin --- 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