#include <NitfHeader.h>

Public Member Functions | |
| virtual | ~Header () |
| bool | importMetadata (const ossimPropertyInterface *pProperties, RasterDataDescriptor *pDescriptor, DynamicObject *pDynObj) |
| bool | exportMetadata (const RasterDataDescriptor *pDescriptor, ossimContainerProperty *pExportHeader) |
Protected Types | |
| typedef bool(* | ImportFunction )(const ossimPropertyInterface *pProperties, RasterDataDescriptor *pDescriptor, DynamicObject *pDynObj, const std::string &appName, const std::string &ossimName) |
| typedef bool(* | ExportFunction )(const RasterDataDescriptor *pDescriptor, const DataVariant &prop, ossimContainerProperty *pProperties, const std::string &appName, const std::string &ossimName) |
Protected Member Functions | |
| Header (const std::string &fileVersion) | |
| virtual std::string | getMetadataPath () const =0 |
| virtual FactoryResource < DynamicObject > | createDefaultsDynamicObject (const RasterDataDescriptor *pDescriptor)=0 |
| bool | exportMetadata (const RasterDataDescriptor *pDescriptor, const DynamicObject *pDynObj, ossimContainerProperty *pProperties) |
Static Protected Member Functions | |
| template<typename T> | |
| static bool | importMetadataValue (const ossimPropertyInterface *pPropertyInterface, RasterDataDescriptor *pDescriptor, DynamicObject *pDynObj, const std::string &appName, const std::string &ossimName) |
| template<typename T> | |
| static bool | exportMetadataValue (const RasterDataDescriptor *pDescriptor, const DataVariant &prop, ossimContainerProperty *pProperties, const std::string &appName, const std::string &ossimName) |
| static bool | importBinaryData (const ossimPropertyInterface *pPropertyInterface, RasterDataDescriptor *pDescriptor, DynamicObject *pDynObj, const std::string &appName, const std::string &ossimName) |
| static bool | exportBinaryData (const RasterDataDescriptor *pDescriptor, const DataVariant &prop, ossimContainerProperty *pProperties, const std::string &appName, const std::string &ossimName) |
| static bool | importColor (const ossimPropertyInterface *pPropertyInterface, RasterDataDescriptor *pDescriptor, DynamicObject *pDynObj, const std::string &appName, const std::string &ossimName) |
| static bool | exportColor (const RasterDataDescriptor *pDescriptor, const DataVariant &prop, ossimContainerProperty *pProperties, const std::string &appName, const std::string &ossimName) |
| static bool | importDateCCYYMMDDhhmmss (const ossimPropertyInterface *pPropertyInterface, RasterDataDescriptor *pDescriptor, DynamicObject *pDynObj, const std::string &appName, const std::string &ossimName) |
| static bool | exportDateCCYYMMDDhhmmss (const RasterDataDescriptor *pDescriptor, const DataVariant &prop, ossimContainerProperty *pProperties, const std::string &appName, const std::string &ossimName) |
| static bool | importDateCCYYMMDD (const ossimPropertyInterface *pPropertyInterface, RasterDataDescriptor *pDescriptor, DynamicObject *pDynObj, const std::string &appName, const std::string &ossimName) |
| static bool | exportDateCCYYMMDD (const RasterDataDescriptor *pDescriptor, const DataVariant &prop, ossimContainerProperty *pProperties, const std::string &appName, const std::string &ossimName) |
| static bool | importDateDDHHMMSSZMONYY (const ossimPropertyInterface *pPropertyInterface, RasterDataDescriptor *pDescriptor, DynamicObject *pDynObj, const std::string &appName, const std::string &ossimName) |
| static bool | importDateYYMMDD (const ossimPropertyInterface *pPropertyInterface, RasterDataDescriptor *pDescriptor, DynamicObject *pDynObj, const string &appName, const string &ossimName) |
Protected Attributes | |
| std::vector< Element > | mElements |
| const std::string | mFileVersion |
Classes | |
| struct | Element |
| An Element contains all information needed to import and export a piece of metadata. More... | |
To be useful, this class must be subclassed to provide behavior for a specific header or subheader. Subclass behavior must include a public import method, which calls the protected one on this class.
When importing or exporting, the Header iterates over the contents of Header::mElements, calling the appropriate functions to import/export.
Definition at line 45 of file NitfHeader.h.
typedef bool(* Nitf::Header::ImportFunction)(const ossimPropertyInterface *pProperties, RasterDataDescriptor *pDescriptor, DynamicObject *pDynObj, const std::string &appName, const std::string &ossimName) [protected] |
Typedef for function pointer to use to import a specific piece of metadata.
Write functions which follow this typedef to add custom behavior for import. See importMetadataValue for an example.
typedef bool(* Nitf::Header::ExportFunction)(const RasterDataDescriptor *pDescriptor, const DataVariant &prop, ossimContainerProperty *pProperties, const std::string &appName, const std::string &ossimName) [protected] |
Typedef for function pointer to use to export a specific piece of metadata.
Write functions which follow this typedef to add custom behavior for import. See exportMetadataValue for an example.
| virtual Nitf::Header::~Header | ( | ) | [virtual] |
Destructs the object.
| Nitf::Header::Header | ( | const std::string & | fileVersion | ) | [protected] |
| bool Nitf::Header::importMetadata | ( | const ossimPropertyInterface * | pProperties, | |
| RasterDataDescriptor * | pDescriptor, | |||
| DynamicObject * | pDynObj | |||
| ) |
Import the metadata from OSSIM into a given DynamicObject.
Subclasses must provide a public import method, which eventually calls this one.
Imports according to the specification in Header::mElements.
| pProperties | The header to import from. | |
| pDescriptor | The Descriptor to import to. | |
| pDynObj | The DynamicObject to import according to the specification. |
| bool Nitf::Header::exportMetadata | ( | const RasterDataDescriptor * | pDescriptor, | |
| ossimContainerProperty * | pExportHeader | |||
| ) |
Export all metadata from the given descriptor to the export header.
This is performed by exporting two DynamicObjects. First, the DynamicObject created by createDefaultsDynamicObject is exported. This should contain any defaults to be exported. This is most useful if the RasterElement wasn't originally a NITF file.
Second, the DynamicObject for this header from the DataDescriptor's metadata object is exported. This should contain metadata as imported from a NITF.
| pDescriptor | The descriptor to export. | |
| pExportHeader | The OSSIM header to export to. |
| virtual std::string Nitf::Header::getMetadataPath | ( | ) | const [protected, pure virtual] |
Returns the metadata location.
Implemented in Nitf::DesSubheader, Nitf::FileHeader, and Nitf::ImageSubheader.
| virtual FactoryResource<DynamicObject> Nitf::Header::createDefaultsDynamicObject | ( | const RasterDataDescriptor * | pDescriptor | ) | [protected, pure virtual] |
Create defaults to export from the given DataDescriptor.
| pDescriptor | Descriptor which will be exported. May be needed to create defaults. |
Implemented in Nitf::DesSubheader, Nitf::FileHeader, and Nitf::ImageSubheader.
| bool Nitf::Header::exportMetadata | ( | const RasterDataDescriptor * | pDescriptor, | |
| const DynamicObject * | pDynObj, | |||
| ossimContainerProperty * | pProperties | |||
| ) | [protected] |
Exports a provided DynamicObject according to the specification in Header::mElements.
| pDescriptor | The Descriptor to export | |
| pDynObj | The DynamicObject to export from. | |
| pProperties | The OSSIM header to export to. |
| static bool Nitf::Header::importMetadataValue | ( | const ossimPropertyInterface * | pPropertyInterface, | |
| RasterDataDescriptor * | pDescriptor, | |||
| DynamicObject * | pDynObj, | |||
| const std::string & | appName, | |||
| const std::string & | ossimName | |||
| ) | [static, protected] |
Generic function to import most metadata.
This function is templated on type to import to the DynamicObject.
| pPropertyInterface | OSSIM property interface to import from. | |
| pDescriptor | Descriptor to import to. | |
| pDynObj | DynamicObject to import to. | |
| appName | The name which is used internally. | |
| ossimName | The name which OSSIM uses to access the property. |
Definition at line 181 of file NitfHeader.h.
| static bool Nitf::Header::exportMetadataValue | ( | const RasterDataDescriptor * | pDescriptor, | |
| const DataVariant & | prop, | |||
| ossimContainerProperty * | pProperties, | |||
| const std::string & | appName, | |||
| const std::string & | ossimName | |||
| ) | [static, protected] |
Generic function to export most metadata.
This function is templated on type stored in the DynamicObject.
| pDescriptor | Descriptor to export from. | |
| prop | DataVariant with stored metadata. | |
| pProperties | ossimContainerProperty to export the metadata to. | |
| appName | The name which is used internally. | |
| ossimName | The name which OSSIM uses to access the property. |
Definition at line 227 of file NitfHeader.h.
| static bool Nitf::Header::importBinaryData | ( | const ossimPropertyInterface * | pPropertyInterface, | |
| RasterDataDescriptor * | pDescriptor, | |||
| DynamicObject * | pDynObj, | |||
| const std::string & | appName, | |||
| const std::string & | ossimName | |||
| ) | [static, protected] |
Import an ossimBinaryDataProperty object as a vector<unsigned char>.
| pPropertyInterface | OSSIM property interface to import from. | |
| pDescriptor | Descriptor to import to. | |
| pDynObj | DynamicObject to import to. | |
| appName | The name which is used internally. | |
| ossimName | The name which OSSIM uses to access the property. |
| static bool Nitf::Header::exportBinaryData | ( | const RasterDataDescriptor * | pDescriptor, | |
| const DataVariant & | prop, | |||
| ossimContainerProperty * | pProperties, | |||
| const std::string & | appName, | |||
| const std::string & | ossimName | |||
| ) | [static, protected] |
Export vector<unsigned char> to an ossimBinaryDataProperty object.
| pDescriptor | Descriptor to export from. | |
| prop | DataVariant with stored metadata. | |
| pProperties | ossimContainerProperty to export the metadata to. | |
| appName | The name which is used internally. | |
| ossimName | The name which OSSIM uses to access the property. |
| static bool Nitf::Header::importColor | ( | const ossimPropertyInterface * | pPropertyInterface, | |
| RasterDataDescriptor * | pDescriptor, | |||
| DynamicObject * | pDynObj, | |||
| const std::string & | appName, | |||
| const std::string & | ossimName | |||
| ) | [static, protected] |
Import ossimColorProperty objects as ColorType objects.
| pPropertyInterface | OSSIM property interface to import from. | |
| pDescriptor | Descriptor to import to. | |
| pDynObj | DynamicObject to import to. | |
| appName | The name which is used internally. | |
| ossimName | The name which OSSIM uses to access the property. |
| static bool Nitf::Header::exportColor | ( | const RasterDataDescriptor * | pDescriptor, | |
| const DataVariant & | prop, | |||
| ossimContainerProperty * | pProperties, | |||
| const std::string & | appName, | |||
| const std::string & | ossimName | |||
| ) | [static, protected] |
Export ColorType objects to ossimColorProperty objects.
| pDescriptor | Descriptor to export from. | |
| prop | DataVariant with stored metadata. | |
| pProperties | ossimContainerProperty to export the metadata to. | |
| appName | The name which is used internally. | |
| ossimName | The name which OSSIM uses to access the property. |
| static bool Nitf::Header::importDateCCYYMMDDhhmmss | ( | const ossimPropertyInterface * | pPropertyInterface, | |
| RasterDataDescriptor * | pDescriptor, | |||
| DynamicObject * | pDynObj, | |||
| const std::string & | appName, | |||
| const std::string & | ossimName | |||
| ) | [static, protected] |
Import dates stored in CCYYMMDDhhmmss format.
| pPropertyInterface | OSSIM property interface to import from. | |
| pDescriptor | Descriptor to import to. | |
| pDynObj | DynamicObject to import to. | |
| appName | The name which is used internally. | |
| ossimName | The name which OSSIM uses to access the property. |
| static bool Nitf::Header::exportDateCCYYMMDDhhmmss | ( | const RasterDataDescriptor * | pDescriptor, | |
| const DataVariant & | prop, | |||
| ossimContainerProperty * | pProperties, | |||
| const std::string & | appName, | |||
| const std::string & | ossimName | |||
| ) | [static, protected] |
Export dates stored in CCYYMMDDhhmmss format.
| pDescriptor | Descriptor to export from. | |
| prop | DataVariant with stored metadata. | |
| pProperties | ossimContainerProperty to export the metadata to. | |
| appName | The name which is used internally. | |
| ossimName | The name which OSSIM uses to access the property. |
| static bool Nitf::Header::importDateCCYYMMDD | ( | const ossimPropertyInterface * | pPropertyInterface, | |
| RasterDataDescriptor * | pDescriptor, | |||
| DynamicObject * | pDynObj, | |||
| const std::string & | appName, | |||
| const std::string & | ossimName | |||
| ) | [static, protected] |
Import dates stored in CCYYMMDD format.
| pPropertyInterface | OSSIM property interface to import from. | |
| pDescriptor | Descriptor to import to. | |
| pDynObj | DynamicObject to import to. | |
| appName | The name which is used internally. | |
| ossimName | The name which OSSIM uses to access the property. |
| static bool Nitf::Header::exportDateCCYYMMDD | ( | const RasterDataDescriptor * | pDescriptor, | |
| const DataVariant & | prop, | |||
| ossimContainerProperty * | pProperties, | |||
| const std::string & | appName, | |||
| const std::string & | ossimName | |||
| ) | [static, protected] |
Export dates stored in CCYYMMDD format.
| pDescriptor | Descriptor to export from. | |
| prop | DataVariant with stored metadata. | |
| pProperties | ossimContainerProperty to export the metadata to. | |
| appName | The name which is used internally. | |
| ossimName | The name which OSSIM uses to access the property. |
| static bool Nitf::Header::importDateDDHHMMSSZMONYY | ( | const ossimPropertyInterface * | pPropertyInterface, | |
| RasterDataDescriptor * | pDescriptor, | |||
| DynamicObject * | pDynObj, | |||
| const std::string & | appName, | |||
| const std::string & | ossimName | |||
| ) | [static, protected] |
Import dates stored in DDHHMMSSZMONYY format.
| pPropertyInterface | OSSIM property interface to import from. | |
| pDescriptor | Descriptor to import to. | |
| pDynObj | DynamicObject to import to. | |
| appName | The name which is used internally. | |
| ossimName | The name which OSSIM uses to access the property. |
| static bool Nitf::Header::importDateYYMMDD | ( | const ossimPropertyInterface * | pPropertyInterface, | |
| RasterDataDescriptor * | pDescriptor, | |||
| DynamicObject * | pDynObj, | |||
| const string & | appName, | |||
| const string & | ossimName | |||
| ) | [static, protected] |
Import dates stored in YYMMDD format.
| pPropertyInterface | OSSIM property interface to import from. | |
| pDescriptor | Descriptor to import to. | |
| pDynObj | DynamicObject to import to. | |
| appName | The name which is used internally. | |
| ossimName | The name which OSSIM uses to access the property. |
std::vector<Element> Nitf::Header::mElements [protected] |
const std::string Nitf::Header::mFileVersion [protected] |
The version of the NITF file - either Nitf::VERSION_02_00 or Nitf::VERSION_02_10.
Definition at line 507 of file NitfHeader.h.