OTB  9.0.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 std::string &key, const std::string &value)
 
void Add (MDGeom key, const boost::any &value)
 
void Add (MDL1D key, const MetaData::LUT1D &value)
 
void Add (MDL2D key, const MetaData::LUT2D &value)
 
void Add (MDNum key, const double &value)
 
void Add (MDNum, const MetaDataKey::VariableLengthVectorType)
 
void Add (MDStr key, const std::string &value)
 
void Add (MDTime key, const MetaData::TimePoint &value)
 
void append (const ImageMetadata &)
 
void AppendToBandKeywordlists (KeywordlistVector &) const
 
void AppendToKeywordlists (KeywordlistVector &) const
 
void compact ()
 
bool FromKeywordlists (const KeywordlistVector &)
 
itk::VariableLengthVector< double > GetAsVector (MDNum key) const
 
std::vector< std::string > GetBandNames () const
 
std::vector< std::string > GetEnhancedBandNames () const
 
int GetSize () const
 
bool HasBandMetadata (MDL1D key) const
 
bool HasBandMetadata (MDNum 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 std::string &key, const std::string &value)
 
void Add (MDGeom key, const boost::any &value)
 
void Add (MDL1D key, const MetaData::LUT1D &value)
 
void Add (MDL2D key, const MetaData::LUT2D &value)
 
void Add (MDNum key, const double &value)
 
void Add (MDStr key, const std::string &value)
 
void Add (MDTime key, const MetaData::TimePoint &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 std::string &key) const
 
bool Has (MDGeom key) const
 
bool Has (MDL1D key) const
 
bool Has (MDL2D key) const
 
bool Has (MDNum key) const
 
bool Has (MDStr key) const
 
bool Has (MDTime key) const
 
bool HasProjectedGeometry () const
 
bool HasSensorGeometry () const
 
 ImageMetadataBase ()=default
 
 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 std::string & operator[] (const std::string &key) const
 
const boost::any & operator[] (MDGeom key) const
 
const MetaData::LUT1Doperator[] (MDL1D key) const
 
const MetaData::LUT2Doperator[] (MDL2D key) const
 
const double & operator[] (MDNum key) const
 
const std::string & operator[] (MDStr key) const
 
const MetaData::TimePointoperator[] (MDTime key) const
 
vcl_size_t Remove (const std::string &key)
 
vcl_size_t Remove (MDGeom key)
 
vcl_size_t Remove (MDL1D key)
 
vcl_size_t Remove (MDL2D key)
 
vcl_size_t Remove (MDNum key)
 
vcl_size_t Remove (MDStr key)
 
vcl_size_t Remove (MDTime 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() [1/8]

void otb::ImageMetadataBase::Add

Setter for numeric keys on each band

◆ Add() [2/8]

void otb::ImageMetadataBase::Add

Setter for numeric keys on each band

◆ Add() [3/8]

void otb::ImageMetadataBase::Add

Setter for numeric keys on each band

◆ Add() [4/8]

void otb::ImageMetadataBase::Add

Setter for numeric keys on each band

◆ Add() [5/8]

void otb::ImageMetadataBase::Add

Setter for numeric keys on each band

◆ Add() [6/8]

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

◆ Add() [7/8]

void otb::ImageMetadataBase::Add

Setter for numeric keys on each band

◆ Add() [8/8]

void otb::ImageMetadataBase::Add

Setter for numeric keys on each band

◆ 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 ( 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 ( MDL1D  key) const

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

◆ HasBandMetadata() [2/2]

bool otb::ImageMetadata::HasBandMetadata ( MDNum  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: