diff --git a/stim/envi/envi.h b/stim/envi/envi.h index ac16ea9..5fd0cb1 100644 --- a/stim/envi/envi.h +++ b/stim/envi/envi.h @@ -69,6 +69,14 @@ public: file = NULL; //set the file pointer to NULL } + envi(std::string filename, std::string headername){ + header.load(headername); + + fname = filename; //save the filename + + allocate(); + } + void* malloc_spectrum(){ diff --git a/stim/parser/filename.h b/stim/parser/filename.h index 0188f92..0f9bfd5 100644 --- a/stim/parser/filename.h +++ b/stim/parser/filename.h @@ -221,6 +221,13 @@ public: return ss.str(); } + //return a string for the filename without an extension + std::string str_noext(){ + std::stringstream ss; + ss<