Scyllarus: C++ Hyperspectral Processing Library
Hyperspectral Image Processing Pipeline
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Pages
hdr_input.h
Go to the documentation of this file.
1 /****************************************************************************************
2  * SCYLLARUS : C++ HYPERSPECTRAL PROCESSING LIBRARY
3  * hdr_input.h - Hyperspectral Image HDR (.hdr, .fla .raw) Input Object.
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 HDRINPUT_H_
12 #define HDRINPUT_H_
13 
14 #include "input.h"
15 #include "logger.h"
16 #include "utility.h"
17 #include "scyllarus_types.h"
18 
19 #include <boost/filesystem.hpp>
20 #include <armadillo>
21 #include <gdal_priv.h>
22 
23 
24 namespace scyl
25 {
26 
41 class hdr_input: public scyl::input
42 {
43 
44 public:
45 
46  hdr_input();
47  hdr_input(std::string filename, bool hold=true, bool is_reflectance=false);
48  virtual ~hdr_input();
49 
50  arma::fcube I() const;
51  arma::fcube I(const arma::uvec bands) const;
52  arma::fcube I(int r0, int c0, int r1, int c1) const;
53  arma::fcube I(const arma::uvec bands, int r0, int c0, int r1, int c1) const;
54 
55  const arma::fcube * I_ptr() const;
56 
57  arma::fcube s() const;
58 
59  const arma::fcube * s_ptr() const;
60 
61  arma::fvec wavelengths() const;
62 
63  GDALDataset * gdal_dataset_ptr() const;
64 
66 
67 
68 private:
69 
70  GDALDataset *m_podataset;
71 
72  std::string m_filename;
73 
74  arma::fvec m_wavelengths;
75 
76  bool m_hold;
77 
79 
80  arma::fcube m_I;
81 
82  arma::fcube m_s;
83 
84 
85 
86 };
87 
88 }
89 #endif /* HDR_INPUT_H_ */
hdr_input()
Definition: hdr_input.cpp:17
Input is a base class from which input classes for the pipeline are derived..
Definition: input.h:33
GDALDataset * m_podataset
Definition: hdr_input.h:70
arma::fcube m_s
Definition: hdr_input.h:82
int bands() const
Get bands.
Definition: input.cpp:58
scyl::INPUT_TYPE type()
Tells you what an object is.
Definition: hdr_input.cpp:570
virtual ~hdr_input()
Definition: hdr_input.cpp:267
bool m_hold
Definition: hdr_input.h:76
arma::fvec wavelengths() const
Gets wavelengths.
Definition: hdr_input.cpp:547
INPUT_TYPE
Definition: scyllarus_types.h:21
bool m_is_reflectance
Definition: hdr_input.h:78
arma::fcube m_I
Definition: hdr_input.h:80
const arma::fcube * s_ptr() const
Gets a pointer to s.
Definition: hdr_input.cpp:528
GDALDataset * gdal_dataset_ptr() const
Gets gdal_dataset_ptr.
Definition: hdr_input.cpp:560
HDR_Input is an object that facilitates reading in of HDR files.
Definition: hdr_input.h:41
arma::fcube I() const
Gets I.
Definition: hdr_input.cpp:281
const arma::fcube * I_ptr() const
Gets a pointer to I.
Definition: hdr_input.cpp:470
arma::fcube s() const
Gets s.
Definition: hdr_input.cpp:490
arma::fvec m_wavelengths
Definition: hdr_input.h:74
std::string m_filename
Definition: hdr_input.h:72