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. | |
| template<class T> | |
| void | WriteField (FieldID fieldId, const T &value) |
| Template function to set the value of a given field. | |
| String | FieldNameAsString (FieldID fieldId) const |
| Gets the field name as Cvb::String. | |
| Spectral::FieldType | FieldType (FieldID fieldId) const |
| Gets the type of the given field. | |
| int | NumberOfFields () const |
| Gets the total number of all fields. | |
| void | ClearField (FieldID fieldId) |
| Clears the given field and sets the FieldType to FieldType::Invalid. | |
| bool | IsFieldDefined (FieldID fieldId) |
| Checks if the given field is already defined. | |
| int | Samples () const |
| Convenience function to access the value of field FieldID::Samples. | |
| int | Lines () const |
| Convenience function to access the value of field FieldID::Lines. | |
| int | Bands () const |
| Convenience function to access the value of field FieldID::Bands. | |
| CubeEncoding | InterleavedType () const |
| Convenience function to access the value of field FieldID::Interleave. | |
| std::vector< double > | Wavelengths () const |
| Convenience function to access the value of field FieldID::Wavelength. | |
| void * | Handle () const noexcept |
| Returns C-API style handle to the metadata. | |
Static Public Member Functions | |
| static std::unique_ptr< MetaData > | Create () |
| Creates an empty metadata object. | |
| static std::unique_ptr< MetaData > | FromHandle (HandleGuard< MetaData > &&guard) |
| Creates metadata from a classic API handle. | |
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) :