Commit 721fd9d13e884c70e4d1a811d388640000c807af

Authored by David Mayerich
1 parent c30dd3e6

fixed problems with images that don't have specified wavelengths: now a waveleng…

…th vector is created from band numbers
Showing 1 changed file with 6 additions and 0 deletions   Show diff stats
stim/envi/envi_header.h
... ... @@ -315,6 +315,12 @@ struct envi_header
315 315 exit(1);
316 316 }
317 317  
  318 + if(wavelength.size() == 0){ //if no list of wavelengths is given, create one based on band numbers
  319 + wavelength.resize(bands);
  320 + for(size_t b = 0; b < bands; b++)
  321 + wavelength[b] = (double)b;
  322 + }
  323 +
318 324 //close the file
319 325 file.close();
320 326  
... ...