Skip to content
Snippets Groups Projects

Resolve "zs computation method return -1 when error occur, whereas "-1" is a valid zs value"

1 file
+ 4
4
Compare changes
  • Side-by-side
  • Inline
+ 4
4
@@ -254,7 +254,7 @@ short compute_snowline_internal(const itk::VectorImage<short, 2>::Pointer compos
for (int i=histogram->GetSize()[0]-1; i>=0; i--)
{
snowline = get_elev_snowline_from_bin(histogram, i, fsnow_lim, fclear_lim, offset, center_offset);
if(snowline != -1)
if(snowline != -1000)
return snowline;
}
}
@@ -263,7 +263,7 @@ short compute_snowline_internal(const itk::VectorImage<short, 2>::Pointer compos
for (unsigned int i=0; i<histogram->GetSize()[0]; ++i)
{
snowline = get_elev_snowline_from_bin(histogram, i, fsnow_lim, fclear_lim, offset, center_offset);
if(snowline != -1)
if(snowline != -1000)
return snowline;
}
}
@@ -302,7 +302,7 @@ short get_elev_snowline_from_bin(const itk::Statistics::ImageToHistogramFilter<i
// Ensure that the current elevation is in the validity range. (nodata and/or inconsistent elevation)
if ( ( histogram->GetMeasurementVector(idx1)[0] < -413 ) && (histogram->GetMeasurementVector(idx1)[0] < 8850) )
{
return -1
return -1000;
}
// Compute the total number of pixels on the altitude bin
@@ -331,7 +331,7 @@ short get_elev_snowline_from_bin(const itk::Statistics::ImageToHistogramFilter<i
}
else
{
return -1;
return -1000;
}
}
Loading