Scyllarus: C++ Hyperspectral Processing Library
Hyperspectral Image Processing Pipeline
|
HDR_Input is an object that facilitates reading in of HDR files. More...
#include <hdr_input.h>
Public Member Functions | |
hdr_input () | |
hdr_input (std::string filename, bool hold=true, bool is_reflectance=false) | |
virtual | ~hdr_input () |
arma::fcube | I () const |
Gets I. More... | |
arma::fcube | I (const arma::uvec bands) const |
Gets I (returns specified bands only) More... | |
arma::fcube | I (int r0, int c0, int r1, int c1) const |
Gets I (returns cropped area) More... | |
arma::fcube | I (const arma::uvec bands, int r0, int c0, int r1, int c1) const |
Gets I (subset of bands) More... | |
const arma::fcube * | I_ptr () const |
Gets a pointer to I. More... | |
arma::fcube | s () const |
Gets s. More... | |
const arma::fcube * | s_ptr () const |
Gets a pointer to s. More... | |
arma::fvec | wavelengths () const |
Gets wavelengths. More... | |
GDALDataset * | gdal_dataset_ptr () const |
Gets gdal_dataset_ptr. More... | |
scyl::INPUT_TYPE | type () |
Tells you what an object is. More... | |
Public Member Functions inherited from scyl::input | |
input () | |
virtual | ~input () |
virtual arma::fvec | illuminant () const |
Gets illuminant. More... | |
virtual arma::fmat | k () const |
Gets k. More... | |
virtual arma::fmat | g () const |
Gets g. More... | |
virtual arma::fmat | elements () const |
Gets elements. More... | |
virtual arma::fmat | endmembers () const |
Gets endmembers. More... | |
virtual std::vector< std::string > | endmember_labels () const |
Gets endmember_labels. More... | |
virtual arma::fcube | element_abundances () const |
Gets element_abundances. More... | |
virtual arma::ucube | element_abundance_indexes () const |
Gets element_abundance_indexes. More... | |
virtual arma::fmat | endmember_abundances () const |
Gets endmember_abundances. More... | |
virtual arma::umat | endmember_abundance_indexes () const |
Gets endmember_abundance_indexes. More... | |
int | height () const |
Get height. More... | |
int | width () const |
Get width. More... | |
int | bands () const |
Get bands. More... | |
Private Attributes | |
GDALDataset * | m_podataset |
std::string | m_filename |
arma::fvec | m_wavelengths |
bool | m_hold |
bool | m_is_reflectance |
arma::fcube | m_I |
arma::fcube | m_s |
Additional Inherited Members | |
Protected Attributes inherited from scyl::input | |
unsigned int | m_height |
unsigned int | m_width |
unsigned int | m_bands |
HDR_Input is an object that facilitates reading in of HDR files.
At the most basic level, the input can be used as follows:
scyl::input * input = scyl::hdr_input("string/filename/path.hdr");
Class members will extract data from the file as requested. Only I() and wavelengths() will return non zero values for HDR files unless the file loaded is a reflectance cube (in which case s() can be used).
Reflectance cubes can be identified in two ways. It can be manually specified with the constructor field 'is_reflectance'. If the cube was saved with Scyllarus, the description field will contain the string 'IRRADIANCE' or 'REFLECTANCE' to indicate the type of cube that was saved (and when this class loads a cube it will check this)
scyl::hdr_input::hdr_input | ( | ) |
HDR_Input Constructor Creates a blank HDR_Input object (can't do anything but be a placeholder till overwritten with a constructed object).
scyl::hdr_input::hdr_input | ( | std::string | filename, |
bool | hold = true , |
||
bool | is_reflectance = false |
||
) |
HDR_Input Constructor Creates a HDR_Input object.
filename | the string path to the file to be loaded. |
hold | set to true if the object is to maintain the image in memory, false otherwise. |
hold | set to true if the cube being loaded is reflectance, false otherwise. |
Exception | Invalid file |
|
virtual |
HDR_Input Destructor.
|
virtual |
Gets gdal_dataset_ptr.
Exception | Data does not exist. |
Reimplemented from scyl::input.
|
virtual |
|
virtual |
Gets I (returns specified bands only)
bands | a list of the indices of the desired bands |
Reimplemented from scyl::input.
|
virtual |
Gets I (returns cropped area)
r0 | beginning row |
c0 | beginning col |
r1 | ending row |
c1 | ending col |
Reimplemented from scyl::input.
|
virtual |
Gets I (subset of bands)
bands | a list of the indices of the desired bands |
r0 | beginning row |
c0 | beginning col |
r1 | ending row |
c1 | ending col |
Exception | Data does not exist. |
Reimplemented from scyl::input.
|
virtual |
|
virtual |
|
virtual |
|
virtual |
|
virtual |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |