Skip to content
Snippets Groups Projects
Commit edf80bbf authored by Rashad Kanavath's avatar Rashad Kanavath
Browse files

COMP: fix error from sed replace

parent b524f55c
No related branches found
No related tags found
No related merge requests found
...@@ -109,9 +109,9 @@ HistogramModel ...@@ -109,9 +109,9 @@ HistogramModel
// Due to float/double conversion, it can happen // Due to float/double conversion, it can happen
// that the minimum or maximum value go slightly outside the histogram // that the minimum or maximum value go slightly outside the histogram
// Clamping the value solves the issue and avoid RangeError // Clamping the value solves the issue and avoid RangeError
// itk::NumericsTraits<>::Clamp(...) was removed // itk::NumericsTraits<>::Clamp(...) was removed
// TODO : when otb::Clamp will be developped, use this function // TODO : when otb::Clamp will be developped, use this function
measurement[0] = measurement[0] =
measurement[0] < histogram->GetBinMin(0, 0) measurement[0] < histogram->GetBinMin(0, 0)
? histogram->GetBinMin(0, 0) ? histogram->GetBinMin(0, 0)
: ( measurement[0] > histogram->GetBinMax(0, histogram->GetSize(0) - 1) : ( measurement[0] > histogram->GetBinMax(0, histogram->GetSize(0) - 1)
...@@ -121,7 +121,7 @@ HistogramModel ...@@ -121,7 +121,7 @@ HistogramModel
// Get the index of measurement in 1D-histogram. // Get the index of measurement in 1D-histogram.
Histogram::IndexType index; Histogram::IndexType index;
if( !histogram->GetIndex( measurement, index ) ) if( !histogram->GetIndex( measurement, index ) )
throw itk::RangeError( FILE__, LINE__ ); throw itk::RangeError( __FILE__, __LINE__ );
assert( index.GetSize()==1 ); assert( index.GetSize()==1 );
...@@ -135,14 +135,14 @@ HistogramModel ...@@ -135,14 +135,14 @@ HistogramModel
// Initialize result (contribution of current bin) // Initialize result (contribution of current bin)
const MeasurementType epsilon = 1.0E-6; const MeasurementType epsilon = 1.0E-6;
double percent = 0.; double percent = 0.;
if ( vcl_abs(maxI - minI) > epsilon ) if ( vcl_abs(maxI - minI) > epsilon )
{ {
percent = frequency percent = frequency
* (bound == BOUND_LOWER ? (intensity - minI) : (maxI - intensity) ) * (bound == BOUND_LOWER ? (intensity - minI) : (maxI - intensity) )
/ ( maxI - minI ); / ( maxI - minI );
} }
// Number of bins of histogram. // Number of bins of histogram.
Histogram::SizeType::SizeValueType binCount = histogram->Size(); Histogram::SizeType::SizeValueType binCount = histogram->Size();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment