Skip to content
Snippets Groups Projects
Commit c8f4b7bc authored by Guillaume Pasero's avatar Guillaume Pasero
Browse files

ENH: return the ImageKeywordlist itself

parent 8d42eb26
No related branches found
No related tags found
No related merge requests found
......@@ -875,7 +875,7 @@ public:
/** Get the keywordlist of the image parameter 'key'. The optional 'idx'
* allows to select the image in an InputImageList.*/
std::map<std::string,std::string> GetImageKeywordlist(const std::string & key, unsigned int idx = 0);
otb::ImageKeywordlist GetImageKeywordlist(const std::string & key, unsigned int idx = 0);
/** Set the requested region on the image parameter 'key' and propagate it.
* The returned value is an estimate of the RAM usage (in Bytes) to process
......
......@@ -1741,18 +1741,17 @@ Application::GetImageProjection(const std::string & key, unsigned int idx)
return proj;
}
std::map<std::string,std::string>
otb::ImageKeywordlist
Application::GetImageKeywordlist(const std::string & key, unsigned int idx)
{
ImageKeywordlist kwl;
const itk::MetaDataDictionary& dict =
this->GetParameterImageBase(key, idx)->GetMetaDataDictionary();
if (!dict.HasKey(MetaDataKey::OSSIMKeywordlistKey))
return std::map<std::string,std::string>();
if (dict.HasKey(MetaDataKey::OSSIMKeywordlistKey))
itk::ExposeMetaData<ImageKeywordlist>(dict, MetaDataKey::OSSIMKeywordlistKey, kwl);
itk::ExposeMetaData<ImageKeywordlist>(dict, MetaDataKey::OSSIMKeywordlistKey, kwl);
return kwl.GetKeywordlist();
return kwl;
}
unsigned long
......
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