Skip to content
Snippets Groups Projects
Commit 8088150a authored by Julien Michel's avatar Julien Michel
Browse files

BUG: Compare double with epsilon (from RFC review)

parent 12d8a3bf
No related branches found
No related tags found
Loading
......@@ -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
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment