Scyllarus: C++ Hyperspectral Processing Library
Hyperspectral Image Processing Pipeline
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Pages
data_input.h
Go to the documentation of this file.
1 /****************************************************************************************
2  * SCYLLARUS : C++ HYPERSPECTRAL PROCESSING LIBRARY
3  * data_input.h - Generic data input class.
4  *
5  * This computer code is subject to copyright:
6  * (c) National ICT Australia Limited (NICTA) 2013-2014 All Rights Reserved.
7  *
8  * Jeremy Oorloff, National ICT Australia (NICTA)
9  *
10  ***************************************************************************************/
11 #ifndef DATAINPUT_H_
12 #define DATAINPUT_H_
13 
14 #include "input.h"
15 #include "logger.h"
16 #include "utility.h"
17 #include "scyllarus_types.h"
18 
19 #include <armadillo>
20 
21 namespace scyl
22 {
23 
35 class data_input: public scyl::input
36 {
37 
38 public:
39 
40  data_input();
41 
42  virtual ~data_input();
43 
44  arma::fcube I() const;
45 
46  const arma::fcube * I_ptr() const;
47 
48  arma::fvec illuminant() const;
49 
50  arma::fmat k() const;
51 
52  arma::fmat g() const;
53 
54  arma::fcube s() const;
55 
56  const arma::fcube * s_ptr() const;
57 
58  arma::fmat elements() const;
59 
60  arma::fcube element_abundances() const;
61 
62  arma::ucube element_abundance_indexes() const;
63 
64  arma::fmat endmembers() const;
65 
66  std::vector<std::string> endmember_labels() const;
67 
68  arma::fmat endmember_abundances() const;
69 
70  arma::umat endmember_abundance_indexes() const;
71 
72  arma::fvec wavelengths() const;
73 
74 
75  // Setters (specific to this class only)
76 
77  void set_I(const arma::fcube & in);
78 
79  void set_illuminant(const arma::fvec & in);
80 
81  void set_k(const arma::fmat & in);
82 
83  void set_g(const arma::fmat & in);
84 
85  void set_s(const arma::fcube & in);
86 
87  void set_elements(const arma::fmat & in);
88 
89  void set_element_abundances(const arma::fcube & in);
90 
91  void set_element_abundance_indexes(const arma::ucube & in);
92 
93  void set_endmembers(const arma::fmat & in);
94 
95  void set_endmember_abundances(const arma::fmat & in);
96 
97  void set_endmember_abundance_indexes(const arma::umat & in);
98 
99  void set_endmember_labels(const std::vector<std::string> & in);
100 
101  void set_wavelengths(const arma::fvec & in);
102 
104 
105 
106 private:
107 
108  arma::fcube m_I;
109  arma::fvec m_illuminant;
110  arma::fmat m_k;
111  arma::fmat m_g;
112  arma::fcube m_s;
113  arma::fmat m_elements;
114  arma::fcube m_element_abundances;
116  arma::fmat m_endmembers;
119  std::vector<std::string> m_endmember_labels;
120  arma::fvec m_wavelengths;
121 
122 };
123 
124 }
125 #endif /* DATAINPUT_H_ */
arma::fmat elements() const
Gets elements.
Definition: data_input.cpp:165
arma::fcube m_element_abundances
Definition: data_input.h:114
Input is a base class from which input classes for the pipeline are derived..
Definition: input.h:33
data_input()
Definition: data_input.cpp:19
arma::fvec m_wavelengths
Definition: data_input.h:120
arma::umat endmember_abundance_indexes() const
Gets endmember_element_abundance_indexes.
Definition: data_input.cpp:267
arma::fmat m_endmember_abundances
Definition: data_input.h:117
void set_endmember_labels(const std::vector< std::string > &in)
Sets endmember_labels for the input object.
Definition: data_input.cpp:584
void set_element_abundance_indexes(const arma::ucube &in)
Sets element_abundance_indexes for the input object.
Definition: data_input.cpp:479
void set_s(const arma::fcube &in)
Sets s for the input object.
Definition: data_input.cpp:404
void set_elements(const arma::fmat &in)
Sets elements for the input object.
Definition: data_input.cpp:435
arma::fvec illuminant() const
Gets illuminant.
Definition: data_input.cpp:80
arma::fmat g() const
Gets g.
Definition: data_input.cpp:114
arma::fcube m_I
Definition: data_input.h:108
arma::fmat m_g
Definition: data_input.h:111
INPUT_TYPE
Definition: scyllarus_types.h:21
arma::fcube I() const
Gets I.
Definition: data_input.cpp:48
void set_k(const arma::fmat &in)
Sets k for the input object.
Definition: data_input.cpp:354
arma::fvec wavelengths() const
Gets wavelengths.
Definition: data_input.cpp:284
std::vector< std::string > m_endmember_labels
Definition: data_input.h:119
void set_endmembers(const arma::fmat &in)
Sets endmembers for the input object.
Definition: data_input.cpp:533
arma::ucube m_element_abundance_indexes
Definition: data_input.h:115
arma::fvec m_illuminant
Definition: data_input.h:109
virtual ~data_input()
Definition: data_input.cpp:36
data_input is an object that allows for manual data input into the pipeline (more 'managed' than usin...
Definition: data_input.h:35
arma::fmat m_endmembers
Definition: data_input.h:116
void set_endmember_abundance_indexes(const arma::umat &in)
Sets endmember_abundance_indexes for the input object.
Definition: data_input.cpp:567
const arma::fcube * I_ptr() const
Gets a pointer to I. I may be unsorted unless I() has been called previously.
Definition: data_input.cpp:63
arma::fmat m_elements
Definition: data_input.h:113
arma::umat m_endmember_abundance_indexes
Definition: data_input.h:118
void set_endmember_abundances(const arma::fmat &in)
Sets endmember_abundances for the input object.
Definition: data_input.cpp:550
scyl::INPUT_TYPE type()
Tells you what an object is.
Definition: data_input.cpp:599
void set_I(const arma::fcube &in)
Sets I for the input object.
Definition: data_input.cpp:303
const arma::fcube * s_ptr() const
Gets a pointer to s.
Definition: data_input.cpp:148
arma::fcube element_abundances() const
Gets element_abundances.
Definition: data_input.cpp:182
void set_wavelengths(const arma::fvec &in)
Sets the wavelength vector for the input object. (Set I first)
Definition: data_input.cpp:507
arma::fmat m_k
Definition: data_input.h:110
arma::fcube s() const
Gets s.
Definition: data_input.cpp:131
arma::fcube m_s
Definition: data_input.h:112
void set_g(const arma::fmat &in)
Sets g for the input object.
Definition: data_input.cpp:379
void set_element_abundances(const arma::fcube &in)
Sets element_abundances for the input object.
Definition: data_input.cpp:454
arma::fmat k() const
Gets k.
Definition: data_input.cpp:97
std::vector< std::string > endmember_labels() const
Gets endmember_labels.
Definition: data_input.cpp:233
arma::fmat endmember_abundances() const
Gets endmember_element_abundances.
Definition: data_input.cpp:250
arma::fmat endmembers() const
Gets endmembers.
Definition: data_input.cpp:216
void set_illuminant(const arma::fvec &in)
Sets illuminant for the input object.
Definition: data_input.cpp:334
arma::ucube element_abundance_indexes() const
Gets element_abundance_indexes.
Definition: data_input.cpp:199