From: Simon Rit Date: Wed, 18 Dec 2013 15:25:28 +0000 (+0100) Subject: Fixed issues with --like option X-Git-Tag: v1.4.0~149 X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=commitdiff_plain;h=cfb0abe4e63621400a2df8d1fe9617d52c48ffa3;p=clitk.git Fixed issues with --like option --- 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()); } //--------------------------------------------------------------------