Skip to content
Snippets Groups Projects
Commit 5f55b21d authored by Julien Michel's avatar Julien Michel
Browse files

ENH: Adding a method in medata interface base class to retrieve no data flags and values

parent 73b05cb3
No related branches found
No related tags found
No related merge requests found
......@@ -107,6 +107,12 @@ public:
double GetGCPZ(unsigned int GCPnum) const;
// otbMetadataGetGCPnumMacro(GCPZ, double, GCPnum, unsigned int);
/**
* Get The no data flags if existing
* return False otherwise
*/
bool GetNoDataFlags(std::vector<bool> & flags, std::vector<double> & values) const;
/** Get the six coefficients of affine geoTtransform. */
VectorType GetGeoTransform() const;
......
......@@ -222,6 +222,17 @@ ImageMetadataInterfaceBase::GetGCPZ(unsigned int GCPnum) const
else return (0);
}
bool
ImageMetadataInterfaceBase::GetNoDataFlags(std::vector<bool> & flags, std::vector<double> & values) const
{
bool ret = itk::ExposeMetaData<std::vector<bool> >(this->GetMetaDataDictionary(),MetaDataKey::NoDataValueAvailable,flags);
if (ret)
ret = itk::ExposeMetaData<std::vector<double> >(this->GetMetaDataDictionary(),MetaDataKey::NoDataValue,values);
return ret;
}
ImageMetadataInterfaceBase::VectorType
ImageMetadataInterfaceBase::GetGeoTransform() const
{
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment