Commit b315bdca authored by Julien Michel's avatar Julien Michel

ENH: Adding helper methods to set ImageKeywordList and ProjectionRef to Image/VectorImage

parent f45c930e
......@@ -141,6 +141,9 @@ public:
/** Get the projection coordinate system of the image. */
virtual std::string GetProjectionRef(void) const;
virtual void SetProjectionRef(const std::string& wkt);
/** Get the GCP projection coordinates of the image. */
virtual std::string GetGCPProjection(void) const;
......@@ -168,8 +171,11 @@ public:
/** Get image keyword list */
virtual ImageKeywordlistType GetImageKeywordlist(void);
virtual const ImageKeywordlistType GetImageKeywordlist(void) const;
virtual void SetImageKeywordList(const ImageKeywordlistType& kwl);
void PrintSelf(std::ostream& os, itk::Indent indent) const;
/// Copy metadata from a DataObject
......
......@@ -37,6 +37,13 @@ std::string Image<TPixel, VImageDimension>::GetProjectionRef(void) const
return (this->GetMetaDataInterface()->GetProjectionRef());
}
template <class TPixel, unsigned int VImageDimension>
void
Image<TPixel, VImageDimension>::SetProjectionRef(const std::string& kwl)
{
itk::EncapsulateMetaData<std::string>(this->GetMetaDataDictionary(),MetaDataKey::ProjectionRefKey,kwl);
}
template <class TPixel, unsigned int VImageDimension>
std::string Image<TPixel, VImageDimension>::GetGCPProjection(void) const
{
......@@ -150,6 +157,14 @@ Image<TPixel, VImageDimension>::GetImageKeywordlist(void)
return kwl;
}
template <class TPixel, unsigned int VImageDimension>
void
Image<TPixel,VImageDimension>::SetImageKeywordList(const ImageKeywordlistType& kwl)
{
itk::EncapsulateMetaData<ImageKeywordlistType>(this->GetMetaDataDictionary(),MetaDataKey::OSSIMKeywordlistKey,kwl);
}
template <class TPixel, unsigned int VImageDimension>
const typename Image<TPixel, VImageDimension>::ImageKeywordlistType
Image<TPixel, VImageDimension>::GetImageKeywordlist(void) const
......
......@@ -113,6 +113,8 @@ public:
/** Get the projection coordinate system of the image. */
virtual std::string GetProjectionRef(void) const;
virtual void SetProjectionRef(const std::string& wkt);
/** Get the GCP projection coordinates of the image. */
virtual std::string GetGCPProjection(void) const;
......@@ -142,6 +144,8 @@ public:
virtual ImageKeywordlistType GetImageKeywordlist(void);
virtual const ImageKeywordlistType GetImageKeywordlist(void) const;
virtual void SetImageKeywordList(const ImageKeywordlistType& kwl);
/// Copy metadata from a DataObject
virtual void CopyInformation(const itk::DataObject *);
......
......@@ -38,6 +38,14 @@ std::string VectorImage<TPixel, VImageDimension>::GetProjectionRef(void) const
return (this->GetMetaDataInterface()->GetProjectionRef());
}
template <class TPixel, unsigned int VImageDimension>
void
VectorImage<TPixel, VImageDimension>::SetProjectionRef(const std::string& kwl)
{
itk::EncapsulateMetaData<std::string>(this->GetMetaDataDictionary(),MetaDataKey::ProjectionRefKey,kwl);
}
template <class TPixel, unsigned int VImageDimension>
std::string VectorImage<TPixel, VImageDimension>::GetGCPProjection(void) const
{
......@@ -163,6 +171,14 @@ VectorImage<TPixel, VImageDimension>::GetImageKeywordlist(void) const
return kwl;
}
template <class TPixel, unsigned int VImageDimension>
void
VectorImage<TPixel,VImageDimension>::SetImageKeywordList(const ImageKeywordlistType& kwl)
{
itk::EncapsulateMetaData<ImageKeywordlistType>(this->GetMetaDataDictionary(),MetaDataKey::OSSIMKeywordlistKey,kwl);
}
template <class TPixel, unsigned int VImageDimension>
void
VectorImage<TPixel, VImageDimension>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment