X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;ds=sidebyside;f=itk%2FclitkResampleImageWithOptionsFilter.txx;h=a3f88beb3db8443f08fa376da1480433f24e4051;hb=02f230e65dbfde06e84da374bb085643e29b5090;hp=7e5eeab4eb78e9d4745d4b9a92fd8f2e34d6430b;hpb=765020625fbc092d283e221e36c83e60a1844cb7;p=clitk.git diff --git a/itk/clitkResampleImageWithOptionsFilter.txx b/itk/clitkResampleImageWithOptionsFilter.txx index 7e5eeab..a3f88be 100644 --- a/itk/clitkResampleImageWithOptionsFilter.txx +++ b/itk/clitkResampleImageWithOptionsFilter.txx @@ -125,11 +125,15 @@ GenerateOutputInformation() // floor() is used to intentionally reduce the number of slices // because, from a clinical point of view, it's better to // remove data than to add data that privously didn't exist. + if(inputSpacing[i]*m_OutputSpacing[i]<0) + 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 { if (m_OutputSpacing[0] != -1) { // apply spacing, compute size for(unsigned int i=0; iGetOutput(0); // OutputImageRegionType region;