#include <ossimWavelength.h>
Definition at line 34 of file ossimWavelength.h.
◆ WavelengthMap
◆ ossimWavelength() [1/2]
ossimWavelength::ossimWavelength |
( |
| ) |
|
◆ ossimWavelength() [2/2]
◆ ~ossimWavelength()
ossimWavelength::~ossimWavelength |
( |
| ) |
|
◆ end() [1/2]
ossimWavelength::WavelengthMap::const_iterator ossimWavelength::end |
( |
| ) |
const |
◆ end() [2/2]
ossimWavelength::WavelengthMap::iterator ossimWavelength::end |
( |
| ) |
|
◆ findClosestIndex()
Finds index closest to wavelength.
- Parameters
-
requestedWavelength | Requested wavelength in nanometers. |
thresholdFromCenter | in nanometers. |
- Returns
- Closest zero based index to wavelength or -1 if not found.
Definition at line 139 of file ossimWavelength.cpp.
143 WavelengthMap::const_iterator i =
145 if ( i !=
m_map.end() )
147 result = (*i).second;
WavelengthMap::const_iterator findClosestIterator(const ossim_float64 &requestedWavelength, const ossim_float64 &thresholdFromCenter) const
Finds iterator closest to wavelength.
◆ findClosestIterator()
ossimWavelength::WavelengthMap::const_iterator ossimWavelength::findClosestIterator |
( |
const ossim_float64 & |
requestedWavelength, |
|
|
const ossim_float64 & |
thresholdFromCenter |
|
) |
| const |
Finds iterator closest to wavelength.
- Parameters
-
requestedWavelength | Requested wavelength in nanometers. |
thresholdFromCenter | in nanometers. |
- Returns
- WavelengthMap::const_iterator if not found will return.
Definition at line 100 of file ossimWavelength.cpp.
104 WavelengthMap::const_iterator result =
m_map.lower_bound( requestedWavelength );
105 if ( result !=
m_map.end() )
107 if ( result !=
m_map.begin() )
110 WavelengthMap::const_iterator lower = result;
113 ossim_float64 t = (requestedWavelength - lower->first) / (result->first -lower->first);
125 if ( result !=
m_map.end() )
128 if ( std::fabs( result->first - requestedWavelength) > thresholdFromCenter )
130 result =
m_map.end();
◆ getMap() [1/2]
◆ getMap() [2/2]
◆ getRgbBands()
bool ossimWavelength::getRgbBands |
( |
std::vector< ossim_uint32 > & |
bands | ) |
const |
Gets rgb bands if "wavelength" keyword is present.
- Parameters
-
bands | Initialized by this with zero base rbg band indexes. |
- Returns
- true on success, false if bands not found.
Definition at line 153 of file ossimWavelength.cpp.
175 WavelengthMap::const_iterator r =
177 WavelengthMap::const_iterator g =
179 WavelengthMap::const_iterator b =
185 bands[0] = (*r).second;
186 bands[1] = (*g).second;
187 bands[2] = (*b).second;
WavelengthMap::const_iterator findClosestIterator(const ossim_float64 &requestedWavelength, const ossim_float64 &thresholdFromCenter) const
Finds iterator closest to wavelength.
◆ initialize()
Initializes map from ENVI header class.
This will clear any existing map, look for the keywords "wavelength units" and "wavelength".
- Parameters
-
header | to initialize from. |
- Returns
- true on success, false on error.
Definition at line 49 of file ossimWavelength.cpp.
References ossimString::downcase(), ossimEnviHeader::getValue(), m_map, ossimString::size(), ossimString::split(), ossimString::trim(), and true.
61 if ( value.
downcase() ==
"nanometers" )
71 std::vector<ossimString> list;
78 std::vector<ossimString>::const_iterator i = list.begin();
82 while ( i != list.end() )
84 wavelength = (*i).toFloat64();
85 m_map.insert( std::make_pair( wavelength, band ) );
void split(std::vector< ossimString > &result, const ossimString &separatorList, bool skipBlankFields=false) const
Splits this string into a vector of strings (fields) using the delimiter list specified.
std::string::size_type size() const
unsigned int ossim_uint32
ossimString trim(const ossimString &valueToTrim=ossimString(" \\)) const
this will strip lead and trailing character passed in.
static ossimString downcase(const ossimString &aString)
◆ operator=()
◆ m_map
The documentation for this class was generated from the following files: