From cfb0abe4e63621400a2df8d1fe9617d52c48ffa3 Mon Sep 17 00:00:00 2001 From: Simon Rit Date: Wed, 18 Dec 2013 16:25:28 +0100 Subject: [PATCH] Fixed issues with --like option --- itk/clitkResampleImageWithOptionsFilter.txx | 23 ++++++++++----------- 1 file changed, 11 insertions(+), 12 deletions(-) diff --git a/itk/clitkResampleImageWithOptionsFilter.txx b/itk/clitkResampleImageWithOptionsFilter.txx index 35eae54..97dbb64 100644 --- a/itk/clitkResampleImageWithOptionsFilter.txx +++ b/itk/clitkResampleImageWithOptionsFilter.txx @@ -131,20 +131,24 @@ GenerateOutputInformation() itkExceptionMacro( << "Input and output spacings don't have the same signs, can't cope with that" ); m_OutputSize[i] = (int)floor(inputSize[i]*inputSpacing[i]/m_OutputSpacing[i]); } - } else { + } + else if(m_OutputSpacing[0]==-1 || m_OutputSize[0]==0){ if (m_OutputSpacing[0] != -1) { // apply spacing, compute size for(unsigned int i=0; iUpdate(); // Set output - // DD("before Graft"); - - //this->GraftOutput(filter->GetOutput()); - this->SetNthOutput(0, filter->GetOutput()); - - // DD("after Graft"); + this->GraftOutput(filter->GetOutput()); } //-------------------------------------------------------------------- -- 2.47.1