Skip to content
Snippets Groups Projects
Commit 73a0200c authored by Aurore Dupuis's avatar Aurore Dupuis
Browse files

Merge branch...

Merge branch '66-zs-computation-method-return-1-when-error-occur-whereas-1-is-a-valid-zs-value' into 'release-1.6'

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

See merge request !51
parents 606ae042 95f82aaf
No related branches found
No related tags found
4 merge requests!57Patch 1.6.4,!56Release 1.6,!55Release 1.6,!51Resolve "zs computation method return -1 when error occur, whereas "-1" is a valid zs value"
...@@ -254,7 +254,7 @@ short compute_snowline_internal(const itk::VectorImage<short, 2>::Pointer compos ...@@ -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--) 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); snowline = get_elev_snowline_from_bin(histogram, i, fsnow_lim, fclear_lim, offset, center_offset);
if(snowline != -1) if(snowline != -1000)
return snowline; return snowline;
} }
} }
...@@ -263,7 +263,7 @@ short compute_snowline_internal(const itk::VectorImage<short, 2>::Pointer compos ...@@ -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) 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); snowline = get_elev_snowline_from_bin(histogram, i, fsnow_lim, fclear_lim, offset, center_offset);
if(snowline != -1) if(snowline != -1000)
return snowline; return snowline;
} }
} }
...@@ -302,7 +302,7 @@ short get_elev_snowline_from_bin(const itk::Statistics::ImageToHistogramFilter<i ...@@ -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) // 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) ) 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 // 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 ...@@ -331,7 +331,7 @@ short get_elev_snowline_from_bin(const itk::Statistics::ImageToHistogramFilter<i
} }
else else
{ {
return -1; return -1000;
} }
} }
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