From cea4066498fd0a4f98797da3313e90015383a574 Mon Sep 17 00:00:00 2001 From: David Mayerich Date: Thu, 9 Mar 2017 15:51:51 -0600 Subject: [PATCH] fixed Linux errors --- stim/envi/bip.h | 4 ++-- stim/envi/hsi.h | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/stim/envi/bip.h b/stim/envi/bip.h index 90919cb..7262b11 100644 --- a/stim/envi/bip.h +++ b/stim/envi/bip.h @@ -419,10 +419,10 @@ public: file.read((char*)in, in_bytes); //read an input spectrum for (size_t b = 0; b < Bout; b++) { //for each band wc = bandlist[b]; //set the desired wavelength - band_bounds(wc, b0, b1); //get the surrounding bands + hsi::band_bounds(wc, b0, b1); //get the surrounding bands w0 = w[b0]; //get the wavelength for the lower band w1 = w[b1]; //get the wavelength for the higher band - out[b] = lerp(wc, in[b0], w0, in[b1], w1); //interpolate the spectral values to get the desired output value + out[b] = hsi::lerp(wc, in[b0], w0, in[b1], w1); //interpolate the spectral values to get the desired output value } } else diff --git a/stim/envi/hsi.h b/stim/envi/hsi.h index 22f8d13..d62d97c 100644 --- a/stim/envi/hsi.h +++ b/stim/envi/hsi.h @@ -63,8 +63,8 @@ protected: } /// Gets the two band indices surrounding a given wavelength - void band_bounds(double wavelength, unsigned long long& low, unsigned long long& high){ - unsigned long long B = Z(); + void band_bounds(double wavelength, size_t& low, size_t& high){ + size_t B = Z(); for(high = 0; high < B; high++){ if(w[high] > wavelength) break; } @@ -92,7 +92,7 @@ protected: /// @param s is the spectrum in main memory of length Z() /// @param wavelength is the wavelength value to interpolate out T interp_spectrum(T* s, double wavelength){ - unsigned long long low, high; //indices for the bands surrounding wavelength + size_t low, high; //indices for the bands surrounding wavelength band_bounds(wavelength, low, high); //get the surrounding band indices if(high == w.size()) return s[w.size()-1]; //if the high band is above the wavelength range, return the highest wavelength value @@ -225,4 +225,4 @@ public: } //end namespace STIM -#endif \ No newline at end of file +#endif -- libgit2 0.21.4