#include <NitfImporterShell.h>

Public Member Functions | |
| NitfImporterShell () | |
| virtual | ~NitfImporterShell () |
| virtual std::vector < ImportDescriptor * > | getImportDescriptors (const std::string &filename) |
| virtual unsigned char | getFileAffinity (const std::string &filename) |
| virtual bool | validate (const DataDescriptor *pDescriptor, std::string &errorMessage) const |
| virtual SpatialDataView * | createView () const |
| virtual PlugIn * | getGeoreferencePlugIn () const |
| virtual bool | createRasterPager (RasterElement *pRaster) const |
Static Public Member Functions | |
| static EncodingType | ossimImageHeaderToEncodingType (ossimNitfImageHeaderV2_X *pImgHeader) |
Protected Member Functions | |
| virtual int | getValidationTest (const DataDescriptor *pDescriptor) const |
| virtual ImportDescriptor * | getImportDescriptor (const std::string &filename, const std::string &imageName, const ossimNitfFile *pFile, const ossimNitfFileHeaderV2_X *pFileHeader, const ossimNitfImageHeaderV2_X *pImageSubheader) |
Definition at line 28 of file NitfImporterShell.h.
| Nitf::NitfImporterShell::NitfImporterShell | ( | ) |
| virtual Nitf::NitfImporterShell::~NitfImporterShell | ( | ) | [virtual] |
Destroys the NITF importer plug-in.
| virtual std::vector<ImportDescriptor*> Nitf::NitfImporterShell::getImportDescriptors | ( | const std::string & | filename | ) | [virtual] |
Returns import descriptors for each valid data element in a given file.
This method is called for the importer to parse a given file and create valid import descriptors for each data element in the file that can be used to import the data. The import descriptor objects can be created by calling ModelServices::createImportDescriptor().
| filename | Full path and name of the file to parse for data elements to import. |
Implements Importer.
| virtual unsigned char Nitf::NitfImporterShell::getFileAffinity | ( | const std::string & | filename | ) | [virtual] |
Returns a value indicating if this importer can load this file and how well it can load this file.
The Importer should look at as little of the file as required as quickly as possible when determining the affinity.
| filename | Full path and name of the file. |
Implements Importer.
| virtual bool Nitf::NitfImporterShell::validate | ( | const DataDescriptor * | pDescriptor, | |
| std::string & | errorMessage | |||
| ) | const [virtual] |
Queries whether a given data descriptor can be successfully loaded by the importer.
This method is called for the importer to parse the current settings in the data descriptor to see if it supports loading the data as currently specified in the data descriptor. This allows importers that do not support certain combinations of values to indicate as such. This method is called each time the user changes a value in the import options dialog. This method is also called by ImportAgent::execute() before executing the importer.
| pDescriptor | The data descriptor to query if it can be successfully imported. | |
| errorMessage | An error message that is populated with the reason why the importer cannot load the given data descriptor. This message will be displayed to the user via the importer's Progress object. If this method returns true, this message will be displayed to the user as a warning. If this method returns false, this message will be displayed to the user as an error. |
true if the importer can successfully import the given data descriptor; otherwise returns false.
true. Reimplemented from RasterElementImporterShell.
| virtual SpatialDataView* Nitf::NitfImporterShell::createView | ( | ) | const [virtual] |
Creates a view for the imported data set.
This method creates a view for the imported data set in interactive mode only. Prior to calling this method, the parseInputArgList() method must be called to extract the RasterElement. This method is called from the default implementation of execute() after the createGcpList() method.
A new message log step is created and the initially displayed bands and display mode are added as properties to the step.
Reimplemented from RasterElementImporterShell.
| virtual PlugIn* Nitf::NitfImporterShell::getGeoreferencePlugIn | ( | ) | const [virtual] |
Creates a Georeference plug-in that can be used to georeference the raster data.
This method is called from within execute() if the configuration settings to auto-georeference and to get the georeference plug-in from the importer are enabled. The method is called after calling createGcpList(), regardless of whether a valid GCP list is returned.
The default implementation of this method creates an instance of the GCP Georeference plug-in and calls Georeference::canHandleRasterElement() to see if it can georeference the raster data. If the plug-in supports the raster data, it is returned. Otherwise the plug-in is destroyed and NULL is returned.
Derived importers should override this method if a better Georeference plug-in is available for the raster data.
true. Ownership of the plug-in is transferred to the shell and will be destroyed automatically. NULL is returned if no plug-in is available to georeference the raster data, or if the raster data does not contain georeference information.
Reimplemented from RasterElementImporterShell.
| virtual bool Nitf::NitfImporterShell::createRasterPager | ( | RasterElement * | pRaster | ) | const [virtual] |
Create and set a RasterPager for a given RasterElement.
Most importers should override this method instead of execute(). Overriding this method will allow the importer to get all of the copy and conversion capabilities provided by the default execute().
| pRaster | The RasterElement to create the RasterPager for. |
Reimplemented from RasterElementImporterShell.
| static EncodingType Nitf::NitfImporterShell::ossimImageHeaderToEncodingType | ( | ossimNitfImageHeaderV2_X * | pImgHeader | ) | [static] |
Return the data type of the specified image.
| pImgHeader | The parsed subheader for this image segment. |
| virtual int Nitf::NitfImporterShell::getValidationTest | ( | const DataDescriptor * | pDescriptor | ) | const [protected, virtual] |
Returns the test that should be performed when validating the given data set for import.
This method is called by validate() to determine which tests should be performed to validate the import. This method should be overridden by derived importers to add additional tests or remove default tests.
| pDescriptor | The data descriptor for the data set that is being imported. |
Reimplemented from RasterElementImporterShell.
| virtual ImportDescriptor* Nitf::NitfImporterShell::getImportDescriptor | ( | const std::string & | filename, | |
| const std::string & | imageName, | |||
| const ossimNitfFile * | pFile, | |||
| const ossimNitfFileHeaderV2_X * | pFileHeader, | |||
| const ossimNitfImageHeaderV2_X * | pImageSubheader | |||
| ) | [protected, virtual] |
Allocate and return an ImportDescriptor for the specified image.
This method should allocate an ImportDescriptor (if desired) and set whether it is imported by default. This method should not set any fields in the data descriptor or the file descriptor of the import descriptor. If changes to the defaults are required, the subclass should override getImportDescriptors(), call the base class implementation, and then make the necessary changes.
| filename | The full path and name of the file. | |
| imageName | The name which will be used for image identification. This is a string of the form "I1", "I2", etc. Using this name for the import descriptor is optional. This name will be used for the default pager and image segment. | |
| pFile | The NITF file being loaded. | |
| pFileHeader | The parsed header for this NITF file. | |
| pImageSubheader | The parsed subheader for this image segment. |
NULL if no ImportDescriptor should be created.