OTB  8.1.0
Orfeo Toolbox
Public Types | Public Member Functions | Public Attributes | List of all members
otb::ImageMetadata Class Reference

#include <otbImageMetadata.h>

+ Inheritance diagram for otb::ImageMetadata:
+ Collaboration diagram for otb::ImageMetadata:

Public Types

using ImageMetadataBandsType = std::vector< ImageMetadataBase >
 
using KeywordlistVector = std::vector< ImageMetadata::Keywordlist >
 
- Public Types inherited from otb::ImageMetadataBase
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 MDNum &, const MetaDataKey::VariableLengthVectorType)
 
void append (const ImageMetadata &)
 
void AppendToBandKeywordlists (KeywordlistVector &) const
 
void AppendToKeywordlists (KeywordlistVector &) const
 
void compact ()
 
bool FromKeywordlists (const KeywordlistVector &)
 
itk::VariableLengthVector< double > GetAsVector (const MDNum &key) const
 
std::vector< std::string > GetBandNames () const
 
std::vector< std::string > GetEnhancedBandNames () const
 
int GetSize () const
 
bool HasBandMetadata (const MDNum &key) const
 
bool HasBandMetadata (const MDL1D &key) const
 
 ImageMetadata ()=default
 
 ImageMetadata (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, ImageMetadataBandsType bands)
 
void Merge (const ImageMetadata &)
 
ImageMetadata slice (int start, int end) const
 
- Public Member Functions inherited from otb::ImageMetadataBase
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::GCPParamGetGCPParam () 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::RPCParamGetRPCParam () const
 
const SARParamGetSARParam () 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::LUT1Doperator[] (const MDL1D &key) const
 
const MetaData::LUT2Doperator[] (const MDL2D &key) const
 
const MetaData::TimePointoperator[] (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

ImageMetadataBandsType Bands
 
- Public Attributes inherited from otb::ImageMetadataBase
DictType< std::string, std::string > ExtraKeys
 
DictType< MDGeom, boost::any > GeometryKeys
 
DictType< MDL1D, MetaData::LUT1DLUT1DKeys
 
DictType< MDL2D, MetaData::LUT2DLUT2DKeys
 
DictType< MDNum, double > NumericKeys
 
DictType< MDStr, std::string > StringKeys
 
DictType< MDTime, MetaData::TimePointTimeKeys
 

Detailed Description

Generic class containing image metadata used in OTB.

Definition at line 270 of file otbImageMetadata.h.

Member Typedef Documentation

◆ ImageMetadataBandsType

Band-specific metadatas

Definition at line 277 of file otbImageMetadata.h.

◆ KeywordlistVector

Metadata object as a vector of Keywordlist

Definition at line 274 of file otbImageMetadata.h.

Constructor & Destructor Documentation

◆ ImageMetadata() [1/2]

otb::ImageMetadata::ImageMetadata ( )
default

◆ ImageMetadata() [2/2]

otb::ImageMetadata::ImageMetadata ( 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,
ImageMetadataBandsType  bands 
)

Member Function Documentation

◆ Add()

void otb::ImageMetadata::Add ( const MDNum ,
const MetaDataKey::VariableLengthVectorType   
)

◆ append()

void otb::ImageMetadata::append ( const ImageMetadata )

concatenate with an other ImageMetadata If a key exists in both ImageMetadata, keeps the value of this ImageMetadata.

◆ AppendToBandKeywordlists()

void otb::ImageMetadata::AppendToBandKeywordlists ( KeywordlistVector ) const

Append the bands of the Metadata to a vector of KeywordList. Each KeywordList contain the metadata of a band.

◆ AppendToKeywordlists()

void otb::ImageMetadata::AppendToKeywordlists ( KeywordlistVector ) const

Append the Metadata to a vector of KeywordList. The first KeywordList contains the metadata common to all the bands. The following KeywordList contains the metadata of the bands.

◆ compact()

void otb::ImageMetadata::compact ( )

if all bands share the same value of a key, put it at top level

◆ FromKeywordlists()

bool otb::ImageMetadata::FromKeywordlists ( const KeywordlistVector )

Import metadata from a vector of keywordlist. The first KeywordList contains the metadata common to all the bands. The following KeywordList contains the metadata of the bands. Will skip MDGeom::SensorGeometry. Returns True if all keywords were parsed correctly.

◆ GetAsVector()

itk::VariableLengthVector<double> otb::ImageMetadata::GetAsVector ( const MDNum key) const

Getter for numeric keys on each band

◆ GetBandNames()

std::vector<std::string> otb::ImageMetadata::GetBandNames ( ) const

Return a vector containing the name of each band of the ImageMetadata or an empty vector if at least one band name is missing

◆ GetEnhancedBandNames()

std::vector<std::string> otb::ImageMetadata::GetEnhancedBandNames ( ) const

Return a vector containing the name of each band of the ImageMetadata or an empty vector if at least one band name is missing

◆ GetSize()

int otb::ImageMetadata::GetSize ( ) const

Return the number of elements in the ImageMetadata

◆ HasBandMetadata() [1/2]

bool otb::ImageMetadata::HasBandMetadata ( const MDNum key) const

test whether the metadata corresponding to key is present on each band

◆ HasBandMetadata() [2/2]

bool otb::ImageMetadata::HasBandMetadata ( const MDL1D key) const

test whether the metadata corresponding to key is present on each band

◆ Merge()

void otb::ImageMetadata::Merge ( const ImageMetadata )

merge with another ImageMetadata If a key exists in both ImageMetadata, keeps the value of this ImageMetadata.

◆ slice()

ImageMetadata otb::ImageMetadata::slice ( int  start,
int  end 
) const

Extract metadata from a subset of the bands

Member Data Documentation

◆ Bands

ImageMetadataBandsType otb::ImageMetadata::Bands

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