Commit 3faf9721 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 !52
parents 73a0200c 39567903
......@@ -731,7 +731,7 @@ class snow_detector:
if snow_fraction > self.fsnow_total_lim:
# Test zs value (-1 means that no zs elevation was found)
if self.zs != -1:
if self.zs != -1000:
#~ # NDSI threshold again
#~ ndsi_formula = "(im1b" + str(self.nGreen) + "-im1b" + str(self.nSWIR) + \
#~ ")/(im1b" + str(self.nGreen) + "+im1b" + str(self.nSWIR) + ")"
......
......@@ -224,8 +224,8 @@ short compute_snowline_internal(const itk::VectorImage<short, 2>::Pointer compos
myfile << "Number of bins=0" << std::endl;
myfile.close();
// Return -1 as no zs is found in this case
return -1;
// Return -1000 as no zs is found in this case
return -1OOO;
}
......@@ -248,7 +248,7 @@ short compute_snowline_internal(const itk::VectorImage<short, 2>::Pointer compos
{
print_histogram(*histogram,histo_file);
}
short snowline = -1;
short snowline = -1000;
if(reverse)
{
for (int i=histogram->GetSize()[0]-1; i>=0; i--)
......@@ -267,7 +267,7 @@ short compute_snowline_internal(const itk::VectorImage<short, 2>::Pointer compos
return snowline;
}
}
// snow line not found -1
// snow line not found -1000
return snowline;
}
......
Supports Markdown
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