From 1cbccc9769fd80c1def702e404f42d2a859c7409 Mon Sep 17 00:00:00 2001 From: David Sarrut Date: Fri, 10 Jan 2014 11:14:50 +0100 Subject: [PATCH] Back to the correct version... Benoit you will be hanged ! --- itk/clitkResampleImageWithOptionsFilter.txx | 28 ++++++++++----------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/itk/clitkResampleImageWithOptionsFilter.txx b/itk/clitkResampleImageWithOptionsFilter.txx index 97dbb64..9239afc 100644 --- a/itk/clitkResampleImageWithOptionsFilter.txx +++ b/itk/clitkResampleImageWithOptionsFilter.txx @@ -37,7 +37,7 @@ //-------------------------------------------------------------------- template clitk::ResampleImageWithOptionsFilter:: -ResampleImageWithOptionsFilter():itk::ImageToImageFilter() +ResampleImageWithOptionsFilter():itk::ImageToImageFilter() { static const unsigned int dim = InputImageType::ImageDimension; this->SetNumberOfRequiredInputs(1); @@ -66,7 +66,7 @@ ResampleImageWithOptionsFilter():itk::ImageToImageFilter void clitk::ResampleImageWithOptionsFilter:: -SetInput(const InputImageType * image) +SetInput(const InputImageType * image) { // Process object is not const-correct so the const casting is required. this->SetNthInput(0, const_cast(image)); @@ -78,7 +78,7 @@ SetInput(const InputImageType * image) template void clitk::ResampleImageWithOptionsFilter:: -GenerateInputRequestedRegion() +GenerateInputRequestedRegion() { // call the superclass's implementation of this method Superclass::GenerateInputRequestedRegion(); @@ -99,7 +99,7 @@ GenerateInputRequestedRegion() template void clitk::ResampleImageWithOptionsFilter:: -GenerateOutputInformation() +GenerateOutputInformation() { static const unsigned int dim = InputImageType::ImageDimension; @@ -124,8 +124,8 @@ GenerateOutputInformation() if (m_OutputIsoSpacing != -1) { // apply isoSpacing for(unsigned int i=0; i -void +void clitk::ResampleImageWithOptionsFilter:: -GenerateData() +GenerateData() { - + // Get input pointer InputImagePointer input = dynamic_cast(itk::ProcessObject::GetInput(0)); static const unsigned int dim = InputImageType::ImageDimension; @@ -240,9 +240,9 @@ GenerateData() filter->SetTransform(m_Transform); filter->SetSize(m_OutputSize); filter->SetOutputSpacing(m_OutputSpacing); - filter->SetOutputOrigin(m_OutputOrigin); + filter->SetOutputOrigin(origin); filter->SetDefaultPixelValue(m_DefaultPixelValue); - filter->SetNumberOfThreads(this->GetNumberOfThreads()); + filter->SetNumberOfThreads(this->GetNumberOfThreads()); filter->SetOutputDirection(m_OutputDirection); // <-- NEEDED if we want to keep orientation (in case of PermutAxes for example) // Select interpolator @@ -317,9 +317,9 @@ GenerateData() //-------------------------------------------------------------------- template -typename InputImageType::Pointer -clitk::ResampleImageSpacing(typename InputImageType::Pointer input, - typename InputImageType::SpacingType spacing, +typename InputImageType::Pointer +clitk::ResampleImageSpacing(typename InputImageType::Pointer input, + typename InputImageType::SpacingType spacing, int interpolationType) { typedef clitk::ResampleImageWithOptionsFilter ResampleFilterType; -- 2.47.1