Commit 8088150a authored by Julien Michel's avatar Julien Michel

BUG: Compare double with epsilon (from RFC review)

parent 12d8a3bf
......@@ -45,11 +45,11 @@ SarDeburstImageFilter<TImage>::GenerateOutputInformation()
ImageType * outputPtr = this->GetOutput();
// Check that azimuth spacing has not been modified
if(inputPtr->GetSpacing()[1]!=1.)
if(vcl_abs(inputPtr->GetSpacing()[1]-1.)>=std::numeric_limits<double>::epsilon())
itkExceptionMacro("Can not perform deburst if input image azimuth spacing is not 1.");
// Check that the azimuth sampling grid has not been modified
if(inputPtr->GetOrigin()[1]-static_cast<long>(inputPtr->GetOrigin()[1]) != 0.5)
if(vcl_abs(inputPtr->GetOrigin()[1]-static_cast<long>(inputPtr->GetOrigin()[1])-0.5)>=std::numeric_limits<double>::epsilon())
itkExceptionMacro("Can not perform deburst if input image azimuth origin is not N.5");
// Retrieve input image keywordlist
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment