Isis 3 Programmer Reference
|
A Spectral definition that includes wavelength and center values for each (line, sample) coordinate. More...
#include <SpectralDefinition1D.h>
Public Member Functions | |
SpectralDefinition1D (FileName smileDefFilename) | |
Constructs a SpectralDefinition1D, typically used as the target SpectralDefinition in the desmile application. More... | |
SpectralDefinition1D () | |
construct an empty 1D SpectralDef More... | |
virtual | ~SpectralDefinition1D () |
destructor More... | |
Spectel | findSpectel (const int sample, const int line, const int band) const |
Get the Spectel from this SpectralDefinition at a (s,l,b). More... | |
Spectel | findSpectel (const Spectel &inSpectel, const int sectionNumber) const |
Gets the Spectel from this SpectralDefinition at the same location (s,l,b) as the input Spectel. More... | |
Spectel | findSpectelByWavelength (double wavelength, int sectionNumber) const |
Finds the Spectel with the closest center wavelength (in the given sectionNumber) to the input wavelength. More... | |
virtual int | sectionCount () const |
Returns the number of sections in this Spectral Definition. More... | |
int | sectionNumber (int s, int l, int b) const |
Returns the section number that a spectel is in. More... | |
QString | toString () |
Returns the QString representation of the SpectralDefinition1D. More... | |
virtual int | sampleCount () const |
Returns the number of samples in the calibration image. More... | |
virtual int | lineCount () const |
Returns the number of line in the calibration image. More... | |
virtual int | bandCount () const |
Returns the number of bands in the calibration image. More... | |
Protected Attributes | |
int | m_ns |
Number of samples in input Cube. More... | |
int | m_nl |
Number of lines in input Cube. More... | |
int | m_nb |
Number of bands in input Cube. More... | |
Private Attributes | |
QList< QList< Spectel > * > * | m_spectelList |
Stores each center wavelength and width. More... | |
int | m_numSections |
The number of different sections of the Spectral Definition. More... | |
bool | m_ascendingWavelengths |
Do the wavelengths in a given section ascend? Used to determine sections. More... | |
A Spectral definition that includes wavelength and center values for each (line, sample) coordinate.
2015-06-09 Stuart Sides - Added getSpectel(spectel) and constness
2015-08-09 Kristin Berry - Added documentation, error-checking, updated code to follow standards, made destructor virtual.
2016-08-28 Kelvin Rodriguez - Changed definition of sectionCount to match parent's function to avoid hidden parent virtual function warning. Part of porting to OS X 10.11.
Definition at line 54 of file SpectralDefinition1D.h.
Isis::SpectralDefinition1D::SpectralDefinition1D | ( | FileName | smileDefFilename | ) |
Constructs a SpectralDefinition1D, typically used as the target SpectralDefinition in the desmile application.
smileDefFilename | The filename for the source of the 1D SpectralDefinition. Currently, only CSVs are accepted as input. |
Definition at line 42 of file SpectralDefinition1D.cpp.
References _FILEINFO_, m_ascendingWavelengths, Isis::SpectralDefinition::m_nb, Isis::SpectralDefinition::m_nl, Isis::SpectralDefinition::m_ns, m_numSections, m_spectelList, Isis::toDouble(), Isis::FileName::toString(), Isis::IException::Unknown, and Isis::IException::User.
Isis::SpectralDefinition1D::SpectralDefinition1D | ( | ) |
construct an empty 1D SpectralDef
Definition at line 165 of file SpectralDefinition1D.cpp.
|
virtual |
|
virtualinherited |
Returns the number of bands in the calibration image.
Definition at line 66 of file SpectralDefinition.cpp.
References Isis::SpectralDefinition::m_nb.
|
virtual |
Get the Spectel from this SpectralDefinition at a (s,l,b).
This can be used to determine the center wavelength and filter width in a particular band.
If the (s,l,b) is not in the spectral definition, an empty Spectel is returned.
sample | Sample |
line | Line |
band | Band |
Implements Isis::SpectralDefinition.
Definition at line 189 of file SpectralDefinition1D.cpp.
References m_numSections, and m_spectelList.
|
virtual |
Gets the Spectel from this SpectralDefinition at the same location (s,l,b) as the input Spectel.
inSpectel | The input Spectel used to look up information. |
sectionNumber | The SpectralDefinition's section number that the input Spectel is in. |
Implements Isis::SpectralDefinition.
Definition at line 221 of file SpectralDefinition1D.cpp.
References Isis::Spectel::centerWavelength(), findSpectelByWavelength(), and sectionNumber().
|
virtual |
Finds the Spectel with the closest center wavelength (in the given sectionNumber) to the input wavelength.
wavelength | The closest wavelength to this input wavelength is searched for in the SpectralDefinition. |
sectionNumber | The section number of the definition to search in. |
Implements Isis::SpectralDefinition.
Definition at line 242 of file SpectralDefinition1D.cpp.
References _FILEINFO_, m_numSections, m_spectelList, Isis::Null, sectionNumber(), and Isis::IException::User.
Referenced by findSpectel().
|
virtualinherited |
Returns the number of line in the calibration image.
Definition at line 58 of file SpectralDefinition.cpp.
References Isis::SpectralDefinition::m_nl.
|
virtualinherited |
Returns the number of samples in the calibration image.
Definition at line 50 of file SpectralDefinition.cpp.
References Isis::SpectralDefinition::m_ns.
|
virtual |
Returns the number of sections in this Spectral Definition.
Reimplemented from Isis::SpectralDefinition.
Definition at line 139 of file SpectralDefinition1D.cpp.
References m_numSections.
|
virtual |
Returns the section number that a spectel is in.
s | Sample coordinate of spectel |
l | Line coordinate of spectel |
b | Band coordinate of spectel |
Implements Isis::SpectralDefinition.
Definition at line 153 of file SpectralDefinition1D.cpp.
References m_spectelList.
Referenced by findSpectel(), and findSpectelByWavelength().
QString Isis::SpectralDefinition1D::toString | ( | ) |
Returns the QString representation of the SpectralDefinition1D.
Definition at line 115 of file SpectralDefinition1D.cpp.
References m_spectelList.
|
private |
Do the wavelengths in a given section ascend? Used to determine sections.
Definition at line 76 of file SpectralDefinition1D.h.
Referenced by SpectralDefinition1D().
|
protectedinherited |
Number of bands in input Cube.
Definition at line 78 of file SpectralDefinition.h.
Referenced by Isis::SpectralDefinition::bandCount(), Isis::SpectralDefinition::init(), SpectralDefinition1D(), and Isis::SpectralDefinition2D::SpectralDefinition2D().
|
protectedinherited |
Number of lines in input Cube.
Definition at line 75 of file SpectralDefinition.h.
Referenced by Isis::SpectralDefinition::init(), Isis::SpectralDefinition::lineCount(), SpectralDefinition1D(), and Isis::SpectralDefinition2D::SpectralDefinition2D().
|
protectedinherited |
Number of samples in input Cube.
Definition at line 72 of file SpectralDefinition.h.
Referenced by Isis::SpectralDefinition::init(), Isis::SpectralDefinition::sampleCount(), SpectralDefinition1D(), and Isis::SpectralDefinition2D::SpectralDefinition2D().
|
private |
The number of different sections of the Spectral Definition.
Definition at line 74 of file SpectralDefinition1D.h.
Referenced by findSpectel(), findSpectelByWavelength(), sectionCount(), and SpectralDefinition1D().
Stores each center wavelength and width.
Definition at line 72 of file SpectralDefinition1D.h.
Referenced by findSpectel(), findSpectelByWavelength(), sectionNumber(), SpectralDefinition1D(), toString(), and ~SpectralDefinition1D().