12 #ifndef SPECTRAL_LIBRARY_H_
13 #define SPECTRAL_LIBRARY_H_
20 #include "iotools/slz.h"
50 std::vector<std::string>
labels,
57 void load(std::string filename);
59 void save(std::string filename);
69 std::vector<std::string>
labels(std::string filename=
"")
const;
76 const std::vector<std::string> & in_labels);
78 arma::fmat
endmembers(std::string label=
"", std::string filename=
"")
const;
84 const std::vector<std::string> & in_labels,
85 std::string filename=
"");
88 std::string filename=
"");
91 bool re_evaluate=
false);
94 std::string name=
"nofile",
95 bool re_evaluate=
false);
arma::fvec wavelengths() const
Definition: spectral_library.cpp:230
spectral_library()
Definition: spectral_library.cpp:19
arma::fvec m_wavelengths
Definition: spectral_library.h:103
void delete_endmembers(std::string label="", std::string filename="")
Delete endmembers from the list currently held by the object by label name and or filename...
Definition: spectral_library.cpp:584
void add_library(std::string filename, bool re_evaluate=false)
Append the contents of a SLZ file to the current contents of the object.
Definition: spectral_library.cpp:644
void save(std::string filename)
save() saves the contents of the spectral_library to the specified SLZ file
Definition: spectral_library.cpp:160
std::vector< std::string > labels(std::string filename="") const
Definition: spectral_library.cpp:270
std::string m_metadata
Definition: spectral_library.h:111
arma::fmat endmembers_mean() const
Definition: spectral_library.cpp:460
void set_metadata(const std::string &in)
Definition: spectral_library.cpp:246
std::vector< std::string > labels_mean() const
Definition: spectral_library.cpp:493
void set_wavelengths(const arma::fvec &in)
Definition: spectral_library.cpp:208
unsigned int num_endmembers()
Definition: spectral_library.cpp:732
unsigned int m_bands
Definition: spectral_library.h:109
std::vector< std::tuple< std::string, std::string, arma::fvec > > m_endmember_list
Definition: spectral_library.h:105
void set_endmembers(const arma::fmat &in_endmembers, const std::vector< std::string > &in_labels)
Definition: spectral_library.cpp:359
virtual ~spectral_library()
Definition: spectral_library.cpp:89
std::string metadata() const
Definition: spectral_library.cpp:255
unsigned int bands()
Definition: spectral_library.cpp:722
void add_endmembers(const arma::fmat &in_endmembers, const std::vector< std::string > &in_labels, std::string filename="")
Append endmembers onto the list currently held by the object.
Definition: spectral_library.cpp:528
arma::fmat endmembers(std::string label="", std::string filename="") const
Definition: spectral_library.cpp:396
std::vector< std::string > loaded_files() const
Definition: spectral_library.cpp:309
Spectral Library is a class that loads and saves SLZ files and holds information from them for use wi...
Definition: spectral_library.h:41
void print()
Definition: spectral_library.cpp:737
std::vector< std::string > loaded_file_list() const
Definition: spectral_library.cpp:339
scyl::iotools::slz m_slz
Definition: spectral_library.h:107
void load(std::string filename)
load() initialises the spectral library object that it is called on with the data in the specified fi...
Definition: spectral_library.cpp:109