Isis 3 Developer Reference
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. 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...
 

Detailed Description

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

Author
2015-05-21 Kristin Berry

Constructor & Destructor Documentation

◆ SpectralDefinition1D() [1/2]

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.

References _FILEINFO_, Isis::SpectralDefinition::m_nb, Isis::SpectralDefinition::m_nl, Isis::SpectralDefinition::m_ns, Isis::NULL8, Isis::toDouble(), Isis::FileName::toString(), Isis::IException::Unknown, and Isis::IException::User.

◆ SpectralDefinition1D() [2/2]

Isis::SpectralDefinition1D::SpectralDefinition1D ( )

construct an empty 1D SpectralDef

◆ ~SpectralDefinition1D()

Isis::SpectralDefinition1D::~SpectralDefinition1D ( )
virtual

destructor

Member Function Documentation

◆ bandCount()

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

Returns the number of bands in the calibration image.

References Isis::SpectralDefinition::m_nb.

◆ findSpectel() [1/2]

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.

◆ findSpectel() [2/2]

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.

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

◆ findSpectelByWavelength()

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.

References _FILEINFO_, Isis::Null, sectionNumber(), and Isis::IException::User.

Referenced by findSpectel().

◆ lineCount()

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

Returns the number of line in the calibration image.

References Isis::SpectralDefinition::m_nl.

◆ sampleCount()

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

Returns the number of samples in the calibration image.

References Isis::SpectralDefinition::m_ns.

◆ sectionCount()

int Isis::SpectralDefinition1D::sectionCount ( ) const
virtual

Returns the number of sections in this Spectral Definition.

Returns
int The number of sections in the SpectralDefinition

Reimplemented from Isis::SpectralDefinition.

◆ sectionNumber()

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.

Referenced by findSpectel(), and findSpectelByWavelength().

◆ toString()

QString Isis::SpectralDefinition1D::toString ( )

Returns the QString representation of the SpectralDefinition1D.

Author
Kristin Berry

Member Data Documentation

◆ m_nb

int Isis::SpectralDefinition::m_nb
protectedinherited

◆ m_nl

int Isis::SpectralDefinition::m_nl
protectedinherited

◆ m_ns

int Isis::SpectralDefinition::m_ns
protectedinherited

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