USGS

Isis 3.0 Object Programmers' Reference

Home

Isis::SpectralDefinition1D Class Reference

A Spectral definition that includes wavelength and center values for each (line, sample) coordinate. More...

#include <SpectralDefinition1D.h>

Inheritance diagram for Isis::SpectralDefinition1D:
Inheritance graph
Collaboration diagram for Isis::SpectralDefinition1D:
Collaboration graph

Public Member Functions

 SpectralDefinition1D (FileName smileDefFilename)
 Constructs a SpectralDefinition1D, typically used as the target SpectralDefinition in the desmile application.
 SpectralDefinition1D ()
 construct an empty 1D SpectralDef
virtual ~SpectralDefinition1D ()
 destructor
Spectel findSpectel (const int sample, const int line, const int band) const
 Get the Spectel from this SpectralDefinition at a (s,l,b).
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.
Spectel findSpectelByWavelength (double wavelength, int sectionNumber) const
 Finds the Spectel with the closest center wavelength (in the given sectionNumber) to the input wavelength.
int sectionCount ()
 Returns the number of sections in this Spectral Definition.
int sectionNumber (int s, int l, int b) const
 Returns the section number that a spectel is in.
QString toString ()
 Returns the QString representation of the SpectralDefinition1D.
virtual int sampleCount () const
 Returns the number of samples in the calibration image.
virtual int lineCount () const
 Returns the number of line in the calibration image.
virtual int bandCount () const
 Returns the number of bands in the calibration image.
virtual int sectionCount () const
 Returns the number of sections in the calibration image.

Protected Attributes

int m_ns
 Number of samples in input Cube.
int m_nl
 Number of lines in input Cube.
int m_nb
 Number of bands in input Cube.

Private Attributes

QList< QList< Spectel > * > * m_spectelList
 Stores each center wavelength and width.
int m_numSections
 The number of different sections of the Spectral Definition.
bool m_ascendingWavelengths
 Do the wavelengths in a given section ascend? Used to determine sections.

Detailed Description

A Spectral definition that includes wavelength and center values for each (line, sample) coordinate.

Author
2015-05-21 Kristin Berry
History:
2015-06-09 Stuart Sides - Added getSpectel(spectel) and constness
History:
2015-08-09 Kristin Berry - Added documentation, error-checking, updated code to follow standards, made destructor virtual.

Definition at line 51 of file SpectralDefinition1D.h.

Constructor & Destructor Documentation

Isis::SpectralDefinition1D::SpectralDefinition1D ( FileName  smileDefFilename)

Constructs a SpectralDefinition1D, typically used as the target SpectralDefinition in the desmile application.

Parameters
smileDefFilenameThe filename for the source of the 1D SpectralDefinition. Currently, only CSVs are accepted as input.

Definition at line 41 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::IException::Unknown, and Isis::IException::User.

Isis::SpectralDefinition1D::SpectralDefinition1D ( )

construct an empty 1D SpectralDef

Definition at line 164 of file SpectralDefinition1D.cpp.

Isis::SpectralDefinition1D::~SpectralDefinition1D ( )
virtual

destructor

Definition at line 169 of file SpectralDefinition1D.cpp.

References m_spectelList.

Member Function Documentation

int Isis::SpectralDefinition::bandCount ( ) const
virtualinherited

Returns the number of bands in the calibration image.

Definition at line 66 of file SpectralDefinition.cpp.

References Isis::SpectralDefinition::m_nb.

Spectel Isis::SpectralDefinition1D::findSpectel ( const int  sample,
const int  line,
const int  band 
) const
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.

Parameters
sampleSample
lineLine
bandBand
Returns
Spectel

Implements Isis::SpectralDefinition.

Definition at line 188 of file SpectralDefinition1D.cpp.

References m_numSections, and m_spectelList.

Spectel Isis::SpectralDefinition1D::findSpectel ( const Spectel inSpectel,
const int  sectionNumber 
) const
virtual

Gets the Spectel from this SpectralDefinition at the same location (s,l,b) as the input Spectel.

Author
2015-05-15 Kristin Berry
Parameters
inSpectelThe input Spectel used to look up information.
sectionNumberThe SpectralDefinition's section number that the input Spectel is in.
Returns
Spectel

Implements Isis::SpectralDefinition.

Definition at line 220 of file SpectralDefinition1D.cpp.

References Isis::Spectel::centerWavelength(), findSpectelByWavelength(), and sectionNumber().

Spectel Isis::SpectralDefinition1D::findSpectelByWavelength ( double  wavelength,
int  sectionNumber 
) const
virtual

Finds the Spectel with the closest center wavelength (in the given sectionNumber) to the input wavelength.

Author
2015-05-15 Kristin Berry
Parameters
wavelengthThe closest wavelength to this input wavelength is searched for in the SpectralDefinition.
sectionNumberThe section number of the definition to search in.
Returns
Spectel The Spectel with the closest center wavelength to the input wavelength.

Implements Isis::SpectralDefinition.

Definition at line 241 of file SpectralDefinition1D.cpp.

References _FILEINFO_, m_numSections, m_spectelList, Isis::Null, and Isis::IException::User.

Referenced by findSpectel().

int Isis::SpectralDefinition::lineCount ( ) const
virtualinherited

Returns the number of line in the calibration image.

Definition at line 58 of file SpectralDefinition.cpp.

References Isis::SpectralDefinition::m_nl.

int Isis::SpectralDefinition::sampleCount ( ) const
virtualinherited

Returns the number of samples in the calibration image.

Definition at line 50 of file SpectralDefinition.cpp.

References Isis::SpectralDefinition::m_ns.

int Isis::SpectralDefinition1D::sectionCount ( )

Returns the number of sections in this Spectral Definition.

Returns
int The number of sections in the SpectralDefinition

Definition at line 138 of file SpectralDefinition1D.cpp.

References m_numSections.

int Isis::SpectralDefinition::sectionCount ( ) const
virtualinherited

Returns the number of sections in the calibration image.

Definition at line 75 of file SpectralDefinition.cpp.

References Isis::SpectralDefinition::m_numSections.

int Isis::SpectralDefinition1D::sectionNumber ( int  s,
int  l,
int  b 
) const
virtual

Returns the section number that a spectel is in.

Parameters
sSample coordinate of spectel
lLine coordinate of spectel
bBand coordinate of spectel
Returns
int The section number this spectel is in

Implements Isis::SpectralDefinition.

Definition at line 152 of file SpectralDefinition1D.cpp.

References m_spectelList.

Referenced by findSpectel().

QString Isis::SpectralDefinition1D::toString ( )

Returns the QString representation of the SpectralDefinition1D.

Author
Kristin Berry

Definition at line 114 of file SpectralDefinition1D.cpp.

References m_spectelList.

Member Data Documentation

bool Isis::SpectralDefinition1D::m_ascendingWavelengths
private

Do the wavelengths in a given section ascend? Used to determine sections.

Definition at line 73 of file SpectralDefinition1D.h.

Referenced by SpectralDefinition1D().

int Isis::SpectralDefinition::m_nb
protectedinherited
int Isis::SpectralDefinition::m_nl
protectedinherited
int Isis::SpectralDefinition::m_ns
protectedinherited
int Isis::SpectralDefinition1D::m_numSections
private

The number of different sections of the Spectral Definition.

Definition at line 71 of file SpectralDefinition1D.h.

Referenced by findSpectel(), findSpectelByWavelength(), sectionCount(), and SpectralDefinition1D().

QList< QList<Spectel> *>* Isis::SpectralDefinition1D::m_spectelList
private

Stores each center wavelength and width.

Definition at line 69 of file SpectralDefinition1D.h.

Referenced by findSpectel(), findSpectelByWavelength(), sectionNumber(), SpectralDefinition1D(), toString(), and ~SpectralDefinition1D().


The documentation for this class was generated from the following files: