Skip to content
Snippets Groups Projects
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
No related branches found
No related tags found
4 merge requests!57Patch 1.6.4,!56Release 1.6,!55Release 1.6,!52Resolve "zs computation method return -1 when error occur, whereas "-1" is a valid zs value"
...@@ -731,7 +731,7 @@ class snow_detector: ...@@ -731,7 +731,7 @@ class snow_detector:
if snow_fraction > self.fsnow_total_lim: if snow_fraction > self.fsnow_total_lim:
# Test zs value (-1 means that no zs elevation was found) # Test zs value (-1 means that no zs elevation was found)
if self.zs != -1: if self.zs != -1000:
#~ # NDSI threshold again #~ # NDSI threshold again
#~ ndsi_formula = "(im1b" + str(self.nGreen) + "-im1b" + str(self.nSWIR) + \ #~ ndsi_formula = "(im1b" + str(self.nGreen) + "-im1b" + str(self.nSWIR) + \
#~ ")/(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 ...@@ -224,8 +224,8 @@ short compute_snowline_internal(const itk::VectorImage<short, 2>::Pointer compos
myfile << "Number of bins=0" << std::endl; myfile << "Number of bins=0" << std::endl;
myfile.close(); myfile.close();
// Return -1 as no zs is found in this case // Return -1000 as no zs is found in this case
return -1; return -1OOO;
} }
...@@ -248,7 +248,7 @@ short compute_snowline_internal(const itk::VectorImage<short, 2>::Pointer compos ...@@ -248,7 +248,7 @@ short compute_snowline_internal(const itk::VectorImage<short, 2>::Pointer compos
{ {
print_histogram(*histogram,histo_file); print_histogram(*histogram,histo_file);
} }
short snowline = -1; short snowline = -1000;
if(reverse) if(reverse)
{ {
for (int i=histogram->GetSize()[0]-1; i>=0; i--) 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 ...@@ -267,7 +267,7 @@ short compute_snowline_internal(const itk::VectorImage<short, 2>::Pointer compos
return snowline; return snowline;
} }
} }
// snow line not found -1 // snow line not found -1000
return snowline; return snowline;
} }
......
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