Spectral MetaData object. More...
#include <cvb/spectral/meta_data.hpp>
Public Member Functions | |
template<class T > | |
T | ReadField (const FieldID &fieldId) const |
Template function to get the value of the field. More... | |
template<class T > | |
void | WriteField (FieldID fieldId, const T &value) |
Template function to set the value of a given field. More... | |
String | FieldNameAsString (FieldID fieldId) const |
Gets the field name as Cvb::String. More... | |
Spectral::FieldType | FieldType (FieldID fieldId) const |
Gets the type of the given field. More... | |
int | NumberOfFields () const |
Gets the total number of all fields. More... | |
void | ClearField (FieldID fieldId) |
Clears the given field and sets the FieldType to FieldType::Invalid. More... | |
bool | IsFieldDefined (FieldID fieldId) |
Checks if the given field is already defined. More... | |
int | Samples () const |
Convenience function to access the value of field FieldID::Samples. More... | |
int | Lines () const |
Convenience function to access the value of field FieldID::Lines. More... | |
int | Bands () const |
Convenience function to access the value of field FieldID::Bands. More... | |
CubeEncoding | InterleavedType () const |
Convenience function to access the value of field FieldID::Interleave. More... | |
std::vector< double > | Wavelengths () const |
Convenience function to access the value of field FieldID::Wavelength. More... | |
void * | Handle () const noexcept |
Returns C-API style handle to the metadata. More... | |
Static Public Member Functions | |
static std::unique_ptr< MetaData > | Create () |
Creates an empty metadata object. More... | |
static std::unique_ptr< MetaData > | FromHandle (HandleGuard< MetaData > &&guard) |
Creates metadata from a classic API handle. More... | |
Spectral MetaData object.
|
inline |
Convenience function to access the value of field FieldID::Bands.
Any | exception derived from std::exception including CvbException. |
|
inline |
Clears the given field and sets the FieldType to FieldType::Invalid.
[in] | fieldId | Field to be addressed |
Any | exception derived from std::exception including CvbException. |
|
inlinestatic |
Creates an empty metadata object.
Any | exception derived from std::exception including CvbException. |
Gets the field name as Cvb::String.
[in] | fieldId | Field to be addressed |
Any | exception derived from std::exception including CvbException. |
|
inline |
Gets the type of the given field.
[in] | fieldId | Field to be addressed |
Any | exception derived from std::exception including CvbException. |
|
inlinestatic |
Creates metadata from a classic API handle.
The MetaData takes ownership of the handle, so you must share it before using this function.
[in] | guard | Life time guard for C-API handle. |
Any | exception derived from std::exception including CvbException. |
|
inlinenoexcept |
|
inline |
Convenience function to access the value of field FieldID::Interleave.
Any | exception derived from std::exception including CvbException. |
|
inline |
Checks if the given field is already defined.
[in] | fieldId | Field to be addressed |
Any | exception derived from std::exception including CvbException. |
|
inline |
Convenience function to access the value of field FieldID::Lines.
Any | exception derived from std::exception including CvbException. |
|
inline |
Gets the total number of all fields.
Any | exception derived from std::exception including CvbException. |
|
inline |
Template function to get the value of the field.
[in] | fieldId | Field to be addressed |
Any | exception derived from std::exception including CvbException. |
To access the field the right datatype should be used as template Following templates are supported (FieldType) :
|
inline |
Convenience function to access the value of field FieldID::Samples.
Any | exception derived from std::exception including CvbException. |
|
inline |
Convenience function to access the value of field FieldID::Wavelength.
Any | exception derived from std::exception including CvbException. |
|
inline |
Template function to set the value of a given field.
[in] | fieldId | Field to be addressed. |
[in] | value | New value as template type. |
Any | exception derived from std::exception including CvbException. |
To set the field the right data type should be used as template Following templates are supported (FieldType) :