Isis 3 Programmer 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...
 

Private Member Functions

void init ()
 Constructor initializer. 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...
 

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.
History:
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 35 of file SpectralDefinition1D.h.

Constructor & Destructor Documentation

◆ SpectralDefinition1D() [1/2]

Isis::SpectralDefinition1D::SpectralDefinition1D ( FileName  smileDefFilename)

◆ SpectralDefinition1D() [2/2]

Isis::SpectralDefinition1D::SpectralDefinition1D ( )

construct an empty 1D SpectralDef

Definition at line 149 of file SpectralDefinition1D.cpp.

◆ ~SpectralDefinition1D()

Isis::SpectralDefinition1D::~SpectralDefinition1D ( )
virtual

destructor

Definition at line 154 of file SpectralDefinition1D.cpp.

References m_spectelList.

Member Function Documentation

◆ bandCount()

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

Returns the number of bands in the calibration image.

Definition at line 50 of file SpectralDefinition.cpp.

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.

Definition at line 173 of file SpectralDefinition1D.cpp.

References m_numSections, and m_spectelList.

◆ 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.

Definition at line 205 of file SpectralDefinition1D.cpp.

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.

Definition at line 226 of file SpectralDefinition1D.cpp.

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

Referenced by findSpectel().

◆ init()

void Isis::SpectralDefinition::init ( )
privateinherited

◆ lineCount()

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

Returns the number of line in the calibration image.

Definition at line 42 of file SpectralDefinition.cpp.

References Isis::SpectralDefinition::m_nl.

◆ sampleCount()

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

Returns the number of samples in the calibration image.

Definition at line 34 of file SpectralDefinition.cpp.

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.

Definition at line 123 of file SpectralDefinition1D.cpp.

References m_numSections.

◆ 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.

Definition at line 137 of file SpectralDefinition1D.cpp.

References m_spectelList.

Referenced by findSpectel(), and findSpectelByWavelength().

◆ toString()

QString Isis::SpectralDefinition1D::toString ( )

Returns the QString representation of the SpectralDefinition1D.

Author
Kristin Berry

Definition at line 99 of file SpectralDefinition1D.cpp.

References m_spectelList.

Member Data Documentation

◆ m_ascendingWavelengths

bool Isis::SpectralDefinition1D::m_ascendingWavelengths
private

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

Definition at line 57 of file SpectralDefinition1D.h.

Referenced by SpectralDefinition1D().

◆ m_nb

int Isis::SpectralDefinition::m_nb
protectedinherited

◆ m_nl

int Isis::SpectralDefinition::m_nl
protectedinherited

◆ m_ns

int Isis::SpectralDefinition::m_ns
protectedinherited

◆ m_numSections

int Isis::SpectralDefinition1D::m_numSections
private

The number of different sections of the Spectral Definition.

Definition at line 55 of file SpectralDefinition1D.h.

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

◆ m_spectelList

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

Stores each center wavelength and width.

Definition at line 53 of file SpectralDefinition1D.h.

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


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