![]() |
OTB
8.1.1
Orfeo Toolbox
|
#include <otbImageMetadata.h>
Public Types | |
template<class TKey , class TVal > | |
using | DictType = std::map< TKey, TVal > |
using | Keywordlist = std::unordered_map< std::string, std::string > |
Public Member Functions | |
void | Add (const MDGeom &key, const boost::any &value) |
void | Add (const MDNum &key, const double &value) |
void | Add (const MDStr &key, const std::string &value) |
void | Add (const MDL1D &key, const MetaData::LUT1D &value) |
void | Add (const MDL2D &key, const MetaData::LUT2D &value) |
void | Add (const MDTime &key, const MetaData::TimePoint &value) |
void | Add (const std::string &key, const std::string &value) |
bool | FromKeywordlist (const Keywordlist &) |
void | Fuse (const ImageMetadataBase &) |
std::vector< unsigned int > | GetDefaultDisplay () const |
const Projection::GCPParam & | GetGCPParam () const |
std::string | GetKeyListL1D () const |
std::string | GetKeyListNum () const |
std::string | GetKeyListStr () const |
std::string | GetKeyListTime () const |
std::string | GetProjectedGeometry () const |
std::string | GetProjectionProj () const |
std::string | GetProjectionWKT () const |
const Projection::RPCParam & | GetRPCParam () const |
const SARParam & | GetSARParam () const |
int | GetSize () const |
bool | Has (const MDGeom &key) const |
bool | Has (const MDNum &key) const |
bool | Has (const MDStr &key) const |
bool | Has (const MDL1D &key) const |
bool | Has (const MDL2D &key) const |
bool | Has (const MDTime &key) const |
bool | Has (const std::string &key) const |
bool | HasProjectedGeometry () const |
bool | HasSensorGeometry () const |
ImageMetadataBase () | |
ImageMetadataBase (DictType< MDGeom, boost::any > geometryKeys, DictType< MDNum, double > numericKeys, DictType< MDStr, std::string > stringKeys, DictType< MDL1D, MetaData::LUT1D > lut1DKeys, DictType< MDL2D, MetaData::LUT2D > lut2DKeys, DictType< MDTime, MetaData::TimePoint > timeKeys, DictType< std::string, std::string > extraKeys) | |
const boost::any & | operator[] (const MDGeom &key) const |
const double & | operator[] (const MDNum &key) const |
const std::string & | operator[] (const MDStr &key) const |
const MetaData::LUT1D & | operator[] (const MDL1D &key) const |
const MetaData::LUT2D & | operator[] (const MDL2D &key) const |
const MetaData::TimePoint & | operator[] (const MDTime &key) const |
const std::string & | operator[] (const std::string &key) const |
vcl_size_t | Remove (const MDGeom &key) |
vcl_size_t | Remove (const MDNum &key) |
vcl_size_t | Remove (const MDStr &key) |
vcl_size_t | Remove (const MDL1D &key) |
vcl_size_t | Remove (const MDL2D &key) |
vcl_size_t | Remove (const MDTime &key) |
vcl_size_t | Remove (const std::string &key) |
vcl_size_t | RemoveProjectedGeometry () |
vcl_size_t | RemoveSensorGeometry () |
std::string | ToJSON (bool multiline=false) const |
void | ToKeywordlist (Keywordlist &) const |
Public Attributes | |
DictType< std::string, std::string > | ExtraKeys |
DictType< MDGeom, boost::any > | GeometryKeys |
DictType< MDL1D, MetaData::LUT1D > | LUT1DKeys |
DictType< MDL2D, MetaData::LUT2D > | LUT2DKeys |
DictType< MDNum, double > | NumericKeys |
DictType< MDStr, std::string > | StringKeys |
DictType< MDTime, MetaData::TimePoint > | TimeKeys |
Metadata hybrid dictionary.
Contains a dict of geometry parameters, several typed dictionaries for double, string, and other types. The different metadatas are retrieved with enum classes ( one for each type stored in the dictionary).
Definition at line 49 of file otbImageMetadata.h.
using otb::ImageMetadataBase::DictType = std::map<TKey, TVal> |
type of dictionary used internally
Definition at line 54 of file otbImageMetadata.h.
using otb::ImageMetadataBase::Keywordlist = std::unordered_map<std::string, std::string> |
Definition at line 56 of file otbImageMetadata.h.
otb::ImageMetadataBase::ImageMetadataBase | ( | ) |
otb::ImageMetadataBase::ImageMetadataBase | ( | DictType< MDGeom, boost::any > | geometryKeys, |
DictType< MDNum, double > | numericKeys, | ||
DictType< MDStr, std::string > | stringKeys, | ||
DictType< MDL1D, MetaData::LUT1D > | lut1DKeys, | ||
DictType< MDL2D, MetaData::LUT2D > | lut2DKeys, | ||
DictType< MDTime, MetaData::TimePoint > | timeKeys, | ||
DictType< std::string, std::string > | extraKeys | ||
) |
void otb::ImageMetadataBase::Add | ( | const MDGeom & | key, |
const boost::any & | value | ||
) |
Setter for geometric keys
void otb::ImageMetadataBase::Add | ( | const MDNum & | key, |
const double & | value | ||
) |
Setter for numeric keys
void otb::ImageMetadataBase::Add | ( | const MDStr & | key, |
const std::string & | value | ||
) |
Setter for string keys
void otb::ImageMetadataBase::Add | ( | const MDL1D & | key, |
const MetaData::LUT1D & | value | ||
) |
Setter for 1D LUT keys
void otb::ImageMetadataBase::Add | ( | const MDL2D & | key, |
const MetaData::LUT2D & | value | ||
) |
Setter for 2D LUT keys
void otb::ImageMetadataBase::Add | ( | const MDTime & | key, |
const MetaData::TimePoint & | value | ||
) |
Setter for time keys
void otb::ImageMetadataBase::Add | ( | const std::string & | key, |
const std::string & | value | ||
) |
Setter for extra keys
bool otb::ImageMetadataBase::FromKeywordlist | ( | const Keywordlist & | ) |
Import metadata from a string keywordlist. Will skip MDGeom::SensorGeometry, MDGeom::RPC and MDGeom::GCP. Returns True if all keywords were parsed correctly.
void otb::ImageMetadataBase::Fuse | ( | const ImageMetadataBase & | ) |
Merge with another ImageMetadataBase If a key exists in both ImageMetadataBase, keeps the value of this ImageMetadataBase.
std::vector<unsigned int> otb::ImageMetadataBase::GetDefaultDisplay | ( | ) | const |
Return the band that should be displayed by default, using the information contained in the input ImageMetadata (MDNum::RedDisplayChannel, GreenDisplayChannel and BlueDisplayChannel) the first channel being indexed as 0. If no information is available the default order (0,1,2) is returned instead
const Projection::GCPParam& otb::ImageMetadataBase::GetGCPParam | ( | ) | const |
std::string otb::ImageMetadataBase::GetKeyListL1D | ( | ) | const |
Return the list of valid keys
std::string otb::ImageMetadataBase::GetKeyListNum | ( | ) | const |
Return the list of valid keys
std::string otb::ImageMetadataBase::GetKeyListStr | ( | ) | const |
Return the list of valid keys
std::string otb::ImageMetadataBase::GetKeyListTime | ( | ) | const |
Return the list of valid keys
std::string otb::ImageMetadataBase::GetProjectedGeometry | ( | ) | const |
std::string otb::ImageMetadataBase::GetProjectionProj | ( | ) | const |
std::string otb::ImageMetadataBase::GetProjectionWKT | ( | ) | const |
const Projection::RPCParam& otb::ImageMetadataBase::GetRPCParam | ( | ) | const |
const SARParam& otb::ImageMetadataBase::GetSARParam | ( | ) | const |
int otb::ImageMetadataBase::GetSize | ( | ) | const |
Return the number of elements in the ImageMetadataBase
bool otb::ImageMetadataBase::Has | ( | const MDGeom & | key | ) | const |
Test if a key is available
Referenced by otb::ImageFileReader< TOutputImage, ConvertPixelTraits >::GenerateOutputInformation(), otb::TransformFactories::RPCForwardTransformFactory(), otb::TransformFactories::RPCInverseTransformFactory(), otb::TransformFactories::SARForwardTransformFactory(), otb::TransformFactories::SARInverseTransformFactory(), otb::SarTransformBase< TScalarType, NInputDimensions, NOutputDimensions >::SetMetadata(), and otb::RPCTransformBase< TScalarType, NInputDimensions, NOutputDimensions >::SetMetadata().
bool otb::ImageMetadataBase::Has | ( | const MDNum & | key | ) | const |
Test if a key is available
bool otb::ImageMetadataBase::Has | ( | const MDStr & | key | ) | const |
Test if a key is available
bool otb::ImageMetadataBase::Has | ( | const MDL1D & | key | ) | const |
Test if a key is available
bool otb::ImageMetadataBase::Has | ( | const MDL2D & | key | ) | const |
Test if a key is available
bool otb::ImageMetadataBase::Has | ( | const MDTime & | key | ) | const |
Test if a key is available
bool otb::ImageMetadataBase::Has | ( | const std::string & | key | ) | const |
Test if a key is available
bool otb::ImageMetadataBase::HasProjectedGeometry | ( | ) | const |
bool otb::ImageMetadataBase::HasSensorGeometry | ( | ) | const |
const boost::any& otb::ImageMetadataBase::operator[] | ( | const MDGeom & | key | ) | const |
Read-only accessor to geometric keys
const double& otb::ImageMetadataBase::operator[] | ( | const MDNum & | key | ) | const |
Read-only accessor to numeric keys
const std::string& otb::ImageMetadataBase::operator[] | ( | const MDStr & | key | ) | const |
Read-only accessor to string keys
const MetaData::LUT1D& otb::ImageMetadataBase::operator[] | ( | const MDL1D & | key | ) | const |
Read-only accessor to 1D LUT keys
const MetaData::LUT2D& otb::ImageMetadataBase::operator[] | ( | const MDL2D & | key | ) | const |
Read-only accessor to 2D LUT keys
const MetaData::TimePoint& otb::ImageMetadataBase::operator[] | ( | const MDTime & | key | ) | const |
Return the list of valid keys Read-only accessor to time keys
const std::string& otb::ImageMetadataBase::operator[] | ( | const std::string & | key | ) | const |
Read-only accessor to extra keys
vcl_size_t otb::ImageMetadataBase::Remove | ( | const MDGeom & | key | ) |
Remove a key from the dictionary (even if the key is already missing)
vcl_size_t otb::ImageMetadataBase::Remove | ( | const MDNum & | key | ) |
Remove a key from the dictionary (even if the key is already missing)
vcl_size_t otb::ImageMetadataBase::Remove | ( | const MDStr & | key | ) |
Remove a key from the dictionary (even if the key is already missing)
vcl_size_t otb::ImageMetadataBase::Remove | ( | const MDL1D & | key | ) |
Remove a key from the dictionary (even if the key is already missing)
vcl_size_t otb::ImageMetadataBase::Remove | ( | const MDL2D & | key | ) |
Remove a key from the dictionary (even if the key is already missing)
vcl_size_t otb::ImageMetadataBase::Remove | ( | const MDTime & | key | ) |
Remove a key from the dictionary (even if the key is already missing)
vcl_size_t otb::ImageMetadataBase::Remove | ( | const std::string & | key | ) |
Remove a key from the dictionary (even if the key is already missing)
vcl_size_t otb::ImageMetadataBase::RemoveProjectedGeometry | ( | ) |
vcl_size_t otb::ImageMetadataBase::RemoveSensorGeometry | ( | ) |
std::string otb::ImageMetadataBase::ToJSON | ( | bool | multiline = false | ) | const |
Format the metadata to JSON
void otb::ImageMetadataBase::ToKeywordlist | ( | Keywordlist & | ) | const |
Fill a KeywordList with the metadata
DictType<std::string, std::string> otb::ImageMetadataBase::ExtraKeys |
Definition at line 91 of file otbImageMetadata.h.
Stack of geometry parameters, sorted by decreasing priority Cases with corresponding enum values:
Corner cases we may encounter:
Definition at line 79 of file otbImageMetadata.h.
DictType<MDL1D, MetaData::LUT1D> otb::ImageMetadataBase::LUT1DKeys |
Definition at line 85 of file otbImageMetadata.h.
DictType<MDL2D, MetaData::LUT2D> otb::ImageMetadataBase::LUT2DKeys |
Definition at line 87 of file otbImageMetadata.h.
Definition at line 81 of file otbImageMetadata.h.
Definition at line 83 of file otbImageMetadata.h.
DictType<MDTime, MetaData::TimePoint> otb::ImageMetadataBase::TimeKeys |
Definition at line 89 of file otbImageMetadata.h.