Classes | |
| class | ChipConverter |
| Performs all computation combining ICHIPB and the application's chipping representations. More... | |
| class | DesSubheader |
| Represents the NITF DES subheader. More... | |
| class | FileHeader |
| Represents the NITF file header. More... | |
| class | Header |
| The Header class contains all knowledge needed to succesfully import or export a given NITF header. More... | |
| class | ImageSubheader |
| Represents the NITF image subheader. More... | |
| class | NitfImporterShell |
| Base class for NITF importers. More... | |
| class | TrePlugInResource |
| This is a Resource class for TRE parser plug-ins. More... | |
| class | Properties |
| A plug-in interface used to specify a GUI for displaying and (optionally) editing TRE and DES data. More... | |
| class | PropertiesQWidgetWrapper |
| A plug-in that both implements the Properties and Nitf::Properties interfaces and provides a QWidget. More... | |
| class | OssimFileResource |
| This is a Resource class that opens and closes NITF files with OSSIM. More... | |
| class | OssimImageHandlerResource |
| This is a Resource class that opens and closes images with OSSIM. More... | |
| class | TreParser |
| A plug-in interface used to read and write TREs while importing or exporting a NITF file. More... | |
| class | TreParserShell |
| This class is a shell for a tre parer plug-in. More... | |
| struct | FindFirst |
| Represents getting the first instance of a tag. More... | |
Namespaces | |
| namespace | DesSubheaderFieldNames |
| namespace | FileHeaderFieldNames |
| namespace | ImageSubheaderFieldNames |
| namespace | ImageSubheaderFieldValues |
| namespace | TRE |
Typedefs | |
| typedef EnumWrapper< TreStateEnum > | TreState |
| typedef EnumWrapper < TreExportStatusEnum > | TreExportStatus |
Enumerations | |
| enum | TreStateEnum { VALID = 0, SUSPECT = 1, INVALID = 2, UNTESTED = 3 } |
| enum | TreExportStatusEnum { REMOVE, REPLACE, UNCHANGED } |
Functions | |
| bool | importMetadata (const unsigned int ¤tImage, const Nitf::OssimFileResource &pFile, const ossimNitfFileHeaderV2_X *pFileHeader, const ossimNitfImageHeaderV2_X *pImageSubheader, RasterDataDescriptor *pDescriptor, std::map< std::string, TrePlugInResource > &parsers, std::string &errorMessage) |
| bool | addTagToMetadata (const unsigned int &ownerIndex, const ossimNitfTagInformation &tagInfo, RasterDataDescriptor *pDescriptor, DynamicObject *pTres, DynamicObject *pTreInfo, std::map< std::string, TrePlugInResource > &parsers, std::string &errorMessage) |
| bool | exportMetadata (const RasterDataDescriptor *pDescriptor, const RasterFileDescriptor *pExportDescriptor, ossimNitfWriter *pNitf, Progress *pProgress) |
| std::string | getRpcCoefficient (const std::string &prefix, const unsigned int &num) |
| TreState | MaxState (TreState stateA, TreState stateB) |
| template<class Condition> | |
| const DynamicObject * | getTagHandle (const DynamicObject &nitfMetadata, std::string treName, Condition cond=Condition()) |
| template<typename T> | |
| T | getSentinel () |
| template<typename T> | |
| TreState | testTagValueRange (std::ostream &reporter, const T &testValue, const T &minValue, const T &maxValue) |
| template<typename T> | |
| TreState | testTagValueRange (const DynamicObject &tre, std::ostream &reporter, unsigned int *pNumFields, const std::string &name, const T &minValue, const T &maxValue, bool optional=false) |
| template<typename T> | |
| TreState | testTagValueEq (const DynamicObject &tre, std::ostream &reporter, const std::string &name, const T &eqValue) |
| template<typename T> | |
| TreState | testTagValueNotEq (const DynamicObject &tre, std::ostream &reporter, const std::string &name, const T ¬EqValue) |
| template<typename T> | |
| T | convertBinary (const void *pBuffer, EndianType sourceEndian) |
| bool | bitTest (unsigned int bitMask, unsigned int bit) |
| bool | DtgParseHHMM (const std::string &fDTG, unsigned short &hour, unsigned short &min) |
| bool | DtgParseCCYYMMDDhhmm (const std::string &fDTG, unsigned short &year, unsigned short &month, unsigned short &day, unsigned short &hour, unsigned short &min) |
| bool | DtgParseCCYYMMDDhhmm (const std::string &fDTG, DateTime *pDateTime) |
| bool | DtgParseCCYYMMDDssss (const std::string &date, const std::string &time, DateTime *pDateTime, float &secondsInDay) |
| bool | DtgParseCCYYMMDDhhmmss (const std::string &fDTG, unsigned short &year, unsigned short &month, unsigned short &day, unsigned short &hour, unsigned short &min, unsigned short &sec, bool *pDateValid=NULL, bool *pTimeValid=NULL) |
| bool | DtgParseCCYYMMDDhhmmss (const std::string &fDTG, DateTime *pDateTime) |
| bool | DtgParseCCYYMMDD (const std::string &fDTG, unsigned short &year, unsigned short &month, unsigned short &day) |
| bool | DtgParseCCYYMMDD (const std::string &fDTG, DateTime *pDateTime) |
| bool | DtgParseDDMMMYY (const std::string &fDTG, unsigned short &year, unsigned short &month, unsigned short &day) |
| bool | DtgParseDDMMMYY (const std::string &fDTG, DateTime *pDateTime) |
| bool | DtgParseCCYYMMMDDhhmmss (const std::string &fDTG, unsigned short &year, unsigned short &month, unsigned short &day, unsigned short &hour, unsigned short &min, unsigned short &sec) |
| bool | DtgParseCCYYMMMDDhhmmss (const std::string &fDTG, DateTime *pDateTime) |
| bool | DtgParseDDHHMMSSZMONYY (const std::string &fDTG, unsigned short &year, unsigned short &month, unsigned short &day, unsigned short &hour, unsigned short &min, unsigned short &sec) |
| bool | DtgParseDDHHMMSSZMONYY (const std::string &fDTG, DateTime *pDateTime) |
| bool | DtgParseYYMMDD (const std::string &fDTG, unsigned short &year, unsigned short &month, unsigned short &day) |
| bool | DtgParseYYMMDD (const std::string &fDTG, DateTime *pDateTime) |
| TreState | testTagValidBcsASet (const std::string &testValue, std::ostream &reporter, std::set< std::string > testSet, bool allBlankOk=false, bool notInSetOk=true, bool emitMsgNotInSet=false) |
| TreState | testTagValidBcsASet (const DynamicObject &tre, std::ostream &reporter, unsigned int *pNumFields, const std::string &name, const std::set< std::string > &testSet, bool allBlankOk=false, bool notInSetOk=true, bool emitMsgNotInSet=false) |
| bool | readFromStream (std::istream &strm, std::vector< char > &buf, std::streamsize count, bool bStr=true) |
| std::string | sizeString (const std::string &str, unsigned int size, char fillChar= ' ', bool rightJustify=false) |
| template<typename T> | |
| std::string | toString (T num, unsigned int size, int precision=-1, char fillChar= '0', bool posSign=false, bool sciNotation=false, int expSize=3, bool optional=false, char optionalChar= ' ') |
| template<typename T> | |
| T | fromBuffer (std::vector< char > &buf, bool &ok, bool allBlankOk, bool allDashesOk) |
| template<> | |
| std::string | fromBuffer< std::string > (std::vector< char > &buf, bool &ok, bool allBlankOk, bool allDashesOk) |
| bool | readFieldErrMsg (std::string &msg, const std::string &name, const std::vector< char > &buf, int len) |
| bool | numReadErrMsg (int64_t numRead, int64_t numBytes, std::string &errorMessage) |
| template<typename T> | |
| bool | readField (std::istream &input, DynamicObject &output, bool &success, const std::string &name, int len, std::string &msg, std::vector< char > &buf, bool allBlankOk=false, bool allDashesOk=false) |
| template<typename T> | |
| bool | readAndConvertFromStream (std::istream &input, T &output, bool &success, const std::string &name, int len, std::string &msg, std::vector< char > &buf, bool allBlankOk=false, bool allDashesOk=false) |
| bool | isClassificationValidForExport (const Classification &classification, std::string &errorMessage) |
| bool | isClassificationFieldValidForExport (const Classification &classification, const std::string &fieldName) |
| bool | updateSpecialMetadata (DynamicObject *pMetadata, std::vector< double > ¢erWavelengths, std::vector< double > &startWavelengths, std::vector< double > &endWavelengths, const std::vector< double > &fwhms, bool convertFromInverseCentimeters=false) |
Variables | |
| static const bool | POS_SIGN_TRUE = true |
| static const bool | POS_SIGN_FALSE = false |
| static const bool | ALL_BLANK_TRUE = true |
| static const bool | ALL_BLANK_FALSE = false |
| static const bool | NOT_IN_SET_TRUE = true |
| static const bool | NOT_IN_SET_FALSE = false |
| static const bool | EMIT_MSG_NOT_IN_SET_TRUE = true |
| static const bool | EMIT_MSG_NOT_IN_SET_FALSE = false |
| static const bool | USE_SCIENTIFIC_NOTATION = true |
| static const char | ZERO_FILL = '0' |
| static const int | ONE_EXP_DIGIT = 1 |
| static const std::string | NITF_METADATA = "NITF" |
| static const std::string | FILE_HEADER = "File Header" |
| static const std::string | IMAGE_SUBHEADER = "Image Subheader" |
| static const std::string | DES_METADATA = "DES" |
| static const std::string | TRE_METADATA = "TRE" |
| static const std::string | TRE_INFO_METADATA = "TRE Information" |
| static const std::string | VERSION_02_00 = "02.00" |
| static const std::string | VERSION_02_10 = "02.10" |
| typedef EnumWrapper<TreExportStatusEnum> Nitf::TreExportStatus |
The EnumWrapper contains a given enum value and provides a isValid() method which returns true if the contained enum value is valid.
Please see How To Use EnumWrapper for more information. The wrapped enum values are Nitf::TreExportStatusEnum.
Definition at line 60 of file NitfTreParser.h.
| typedef EnumWrapper<TreStateEnum> Nitf::TreState |
The EnumWrapper contains a given enum value and provides a isValid() method which returns true if the contained enum value is valid.
Please see How To Use EnumWrapper for more information. The wrapped enum values are Nitf::TreStateEnum.
Definition at line 42 of file NitfTreParser.h.
The status of a TRE export.
| REMOVE |
Remove any existing TRE of the name without adding any generated ones.
|
| REPLACE |
Remove any existing TRE of the name while adding the one populated by TreParser::exportMetadata().
|
| UNCHANGED |
Let any TREs of the same name be exported without modifications.
|
Definition at line 49 of file NitfTreParser.h.
| enum Nitf::TreStateEnum |
The state of a given TRE.
| VALID |
A TRE is valid if all fields are present (and the correct type) and the values of each field are within their prescribed ranges.
|
| SUSPECT |
A TRE is suspect if all of its fields are present (and the correct type) but the values of one or more fields are outside their prescribed ranges.
|
| INVALID |
A TRE is invalid if fields are missing.
|
| UNTESTED |
A TRE has not been tested.
|
Definition at line 29 of file NitfTreParser.h.
| bool Nitf::addTagToMetadata | ( | const unsigned int & | ownerIndex, | |
| const ossimNitfTagInformation & | tagInfo, | |||
| RasterDataDescriptor * | pDescriptor, | |||
| DynamicObject * | pTres, | |||
| DynamicObject * | pTreInfo, | |||
| std::map< std::string, TrePlugInResource > & | parsers, | |||
| std::string & | errorMessage | |||
| ) |
Adds a single TRE to a RasterDataDescriptor.
| ownerIndex | The index of the owner of this TRE. | |
| tagInfo | Information about the TRE. | |
| pDescriptor | The RasterDataDescriptor to populate. | |
| pTres | The DynamicObject containing the TREs. | |
| pTreInfo | The DynamicObject containing the locations of the TREs. | |
| parsers | Contains TRE parsers which have already been loaded into memory -- included for performance. | |
| errorMessage | Message for import errors, etc. |
True on success, false otherwise. | bool Nitf::bitTest | ( | unsigned int | bitMask, | |
| unsigned int | bit | |||
| ) |
Test the specified bit.
| bitMask | Mask to tests | |
| bit | Bit of the mask to test |
| T Nitf::convertBinary | ( | const void * | pBuffer, | |
| EndianType | sourceEndian | |||
| ) |
Combination typecast and endian swap.
| pBuffer | Buffer containing non-swapped data | |
| sourceEndian | The endianness of the data in the buffer |
Definition at line 296 of file NitfUtilities.h.
| bool Nitf::DtgParseCCYYMMDD | ( | const std::string & | fDTG, | |
| DateTime * | pDateTime | |||
| ) |
Parse a date-time string of the form CCYYMMDD.
| fDTG | The string to parse | |
| pDateTime | Upon successful return, this contains the date and time from the string. |
| bool Nitf::DtgParseCCYYMMDD | ( | const std::string & | fDTG, | |
| unsigned short & | year, | |||
| unsigned short & | month, | |||
| unsigned short & | day | |||
| ) |
Parse a date-time string of the form CCYYMMDD.
| fDTG | The string to parse | |
| year | Upon successful return, this contains the year (including century) from the string. | |
| month | Upon successful return, this contains the month from the string. | |
| day | Upon successful return, this contains the day from the string. |
| bool Nitf::DtgParseCCYYMMDDhhmm | ( | const std::string & | fDTG, | |
| DateTime * | pDateTime | |||
| ) |
Parse a date-time string of the form CCYYMMDDhhmm.
| fDTG | The string to parse | |
| pDateTime | Upon successful return, this contains the date and time from the string. |
| bool Nitf::DtgParseCCYYMMDDhhmm | ( | const std::string & | fDTG, | |
| unsigned short & | year, | |||
| unsigned short & | month, | |||
| unsigned short & | day, | |||
| unsigned short & | hour, | |||
| unsigned short & | min | |||
| ) |
Parse a date-time string of the form CCYYMMDDhhmm.
| fDTG | The string to parse | |
| year | Upon successful return, this contains the year (including century) from the string. | |
| month | Upon successful return, this contains the month from the string. | |
| day | Upon successful return, this contains the day from the string. | |
| hour | Upon successful return, this contains the hours from the string. | |
| min | Upon successful return, this contains the minutes from the string. |
| bool Nitf::DtgParseCCYYMMDDhhmmss | ( | const std::string & | fDTG, | |
| DateTime * | pDateTime | |||
| ) |
Parse a date-time string of the form CCYYMMDDhhmmss.
| fDTG | The string to parse | |
| pDateTime | Upon successful return, this contains the date and time from the string. |
| bool Nitf::DtgParseCCYYMMDDhhmmss | ( | const std::string & | fDTG, | |
| unsigned short & | year, | |||
| unsigned short & | month, | |||
| unsigned short & | day, | |||
| unsigned short & | hour, | |||
| unsigned short & | min, | |||
| unsigned short & | sec, | |||
| bool * | pDateValid = NULL, |
|||
| bool * | pTimeValid = NULL | |||
| ) |
Parse a date-time string of the form CCYYMMDDhhmmss.
| fDTG | The string to parse | |
| year | Upon successful return, this contains the year (including century) from the string. | |
| month | Upon successful return, this contains the month from the string. | |
| day | Upon successful return, this contains the day from the string. | |
| hour | Upon successful return, this contains the hours from the string. | |
| min | Upon successful return, this contains the minutes from the string. | |
| sec | Upon successful return, this contains the seconds from the string. | |
| pDateValid | If non-NULL, the value pointed at will contain true if the date portion of the date-time string parsed successfully. | |
| pTimeValid | If non-NULL, the value pointed at will contain true if the time portion of the date-time string parsed successfully. |
| bool Nitf::DtgParseCCYYMMDDssss | ( | const std::string & | date, | |
| const std::string & | time, | |||
| DateTime * | pDateTime, | |||
| float & | secondsInDay | |||
| ) |
Parse a date-time from two strings of the form CCYYMMDD and ssss.sss.
| date | The date string to parse | |
| time | The time string to parse, this may have a variable number of digits but must be seconds of the day | |
| pDateTime | Upon successful return, this contains the date and time from the string. | |
| secondsInDay | Return the seconds in the day as a float. pDateTime only contains 1 second resolution so this is required to obtain fractional seconds. This is the value in time as a float. |
True if the parse succeeded, false otherwise. | bool Nitf::DtgParseCCYYMMMDDhhmmss | ( | const std::string & | fDTG, | |
| DateTime * | pDateTime | |||
| ) |
Parse a date-time string of the form CCYYMMDDhhmmss.
| fDTG | The string to parse | |
| pDateTime | Upon successful return, this contains the date and time from the string. |
| bool Nitf::DtgParseCCYYMMMDDhhmmss | ( | const std::string & | fDTG, | |
| unsigned short & | year, | |||
| unsigned short & | month, | |||
| unsigned short & | day, | |||
| unsigned short & | hour, | |||
| unsigned short & | min, | |||
| unsigned short & | sec | |||
| ) |
Parse a date-time string of the form CCYYMMDDhhmmss.
| fDTG | The string to parse | |
| year | Upon successful return, this contains the year (including century) from the string. | |
| month | Upon successful return, this contains the month from the string. | |
| day | Upon successful return, this contains the day from the string. | |
| hour | Upon successful return, this contains the hours from the string. | |
| min | Upon successful return, this contains the minutes from the string. | |
| sec | Upon successful return, this contains the seconds from the string. |
| bool Nitf::DtgParseDDHHMMSSZMONYY | ( | const std::string & | fDTG, | |
| DateTime * | pDateTime | |||
| ) |
Parse a date-time string of the form CCYYMMDDhhmmss, where MMM is a three-letter abbreviation for the month.
| fDTG | The string to parse | |
| pDateTime | Upon successful return, this contains the date and time from the string. The century assumes that any two-digit year less than 48 refers to 2000 + YY, and any two-digit year greater than or equal to 48 refers to 1900 + YY. |
| bool Nitf::DtgParseDDHHMMSSZMONYY | ( | const std::string & | fDTG, | |
| unsigned short & | year, | |||
| unsigned short & | month, | |||
| unsigned short & | day, | |||
| unsigned short & | hour, | |||
| unsigned short & | min, | |||
| unsigned short & | sec | |||
| ) |
Parse a date-time string of the form DDHHMMSSZMONYY, where MMM is a three-letter abbreviation for the month.
| fDTG | The string to parse | |
| year | Upon successful return, this contains the year (including century) from the string. The century assumes that any two-digit year less than 48 refers to 2000 + YY, and any two-digit year greater than or equal to 48 refers to 1900 + YY. | |
| month | Upon successful return, this contains the month from the string. | |
| day | Upon successful return, this contains the day from the string. | |
| hour | Upon successful return, this contains the hours from the string. | |
| min | Upon successful return, this contains the minutes from the string. | |
| sec | Upon successful return, this contains the seconds from the string. |
| bool Nitf::DtgParseDDMMMYY | ( | const std::string & | fDTG, | |
| DateTime * | pDateTime | |||
| ) |
Parse a date-time string of the form DDMMMYY, where MMM is a three-letter abbreviation for the month.
| fDTG | The string to parse | |
| pDateTime | Upon successful return, this contains the date and time from the string. The century assumes that any two-digit year less than 48 refers to 2000 + YY, and any two-digit year greater than or equal to 48 refers to 1900 + YY. |
| bool Nitf::DtgParseDDMMMYY | ( | const std::string & | fDTG, | |
| unsigned short & | year, | |||
| unsigned short & | month, | |||
| unsigned short & | day | |||
| ) |
Parse a date-time string of the form DDMMMYY, where MMM is a three-letter abbreviation for the month.
| fDTG | The string to parse | |
| year | Upon successful return, this contains the year (including century) from the string. The century assumes that any two-digit year less than 48 refers to 2000 + YY, and any two-digit year greater than or equal to 48 refers to 1900 + YY. | |
| month | Upon successful return, this contains the 1-based month from the string. | |
| day | Upon successful return, this contains the day from the string. |
| bool Nitf::DtgParseHHMM | ( | const std::string & | fDTG, | |
| unsigned short & | hour, | |||
| unsigned short & | min | |||
| ) |
Parse a date-time string of the form HHMM (hour minute).
| fDTG | The string to parse | |
| hour | Upon successful return, this contains the hours from the string. | |
| min | Upon successful return, this contains the minutes from the string. |
| bool Nitf::DtgParseYYMMDD | ( | const std::string & | fDTG, | |
| DateTime * | pDateTime | |||
| ) |
Parse a date-time string of the form YYMMDD.
| fDTG | The string to parse. | |
| pDateTime | Upon successful return, this contains the date from the string. The century assumes that any two-digit year less than 48 refers to 2000 + YY, and any two-digit year greater than or equal to 48 refers to 1900 + YY. |
| bool Nitf::DtgParseYYMMDD | ( | const std::string & | fDTG, | |
| unsigned short & | year, | |||
| unsigned short & | month, | |||
| unsigned short & | day | |||
| ) |
Parse a date-time string of the form YYMMDD.
| fDTG | The string to parse. | |
| year | Upon successful return, this contains the year (including century) from the string. The century assumes that any two-digit year less than 48 refers to 2000 + YY, and any two-digit year greater than or equal to 48 refers to 1900 + YY. | |
| month | Upon successful return, this contains the month from the string. | |
| day | Upon successful return, this contains the day from the string. |
| bool Nitf::exportMetadata | ( | const RasterDataDescriptor * | pDescriptor, | |
| const RasterFileDescriptor * | pExportDescriptor, | |||
| ossimNitfWriter * | pNitf, | |||
| Progress * | pProgress | |||
| ) |
Exports supported metadata for the specified image into pNitf.
| pDescriptor | The RasterDataDescriptor containing the metadata to export. | |
| pExportDescriptor | The RasterFileDescriptor for export. | |
| pNitf | The ossimNitfWriter to populate. | |
| pProgress | The Progress object to use. |
True on success, false otherwise. | T Nitf::fromBuffer | ( | std::vector< char > & | buf, | |
| bool & | ok, | |||
| bool | allBlankOk, | |||
| bool | allDashesOk | |||
| ) |
Definition at line 861 of file NitfUtilities.h.
| std::string Nitf::fromBuffer< std::string > | ( | std::vector< char > & | buf, | |
| bool & | ok, | |||
| bool | allBlankOk, | |||
| bool | allDashesOk | |||
| ) |
| std::string Nitf::getRpcCoefficient | ( | const std::string & | prefix, | |
| const unsigned int & | num | |||
| ) |
Returns the string representation of the given RPC coefficient.
| prefix | The prefix for the coefficient name. | |
| num | The coefficient number to get [1, 20]. |
| T Nitf::getSentinel | ( | ) |
Gets the sentinel value for a given field.
Definition at line 127 of file NitfUtilities.h.
| const DynamicObject* Nitf::getTagHandle | ( | const DynamicObject & | nitfMetadata, | |
| std::string | treName, | |||
| Condition | cond = Condition() | |||
| ) |
Gets a handle to a TRE out of the NITF Metadata.
You can provide a functor to filter out which TRE to fetch (ie. find the first ICHIPB with an OP_COL_11 field that is valid). Example:
// Get the first instance of the RPC00B TRE; assumes nitfMetadata is the NITF metadata DynamicObject DynamicObject* pDynObj = getTagHandle(nitfMetadata, "RPC00B", FindFirst());
| nitfMetadata | The cube's NITF metadata object. | |
| treName | The name of the TRE. | |
| cond | A functor that determines if the DynamicObject passed in should be fetched. argument is provided, gets the first instance of the tag. |
Definition at line 89 of file NitfUtilities.h.
| bool Nitf::importMetadata | ( | const unsigned int & | currentImage, | |
| const Nitf::OssimFileResource & | pFile, | |||
| const ossimNitfFileHeaderV2_X * | pFileHeader, | |||
| const ossimNitfImageHeaderV2_X * | pImageSubheader, | |||
| RasterDataDescriptor * | pDescriptor, | |||
| std::map< std::string, TrePlugInResource > & | parsers, | |||
| std::string & | errorMessage | |||
| ) |
Imports supported metadata for the specified image into a RasterDataDescriptor.
| currentImage | The index of the image to import. | |
| pFile | The source file. | |
| pFileHeader | The header of the source file. | |
| pImageSubheader | The current image subheader. | |
| pDescriptor | The RasterDataDescriptor to populate. | |
| parsers | Contains TRE parsers which have already been loaded into memory -- included for improved performance. | |
| errorMessage | Message for import errors, etc. |
True on success, false otherwise. | bool Nitf::isClassificationFieldValidForExport | ( | const Classification & | classification, | |
| const std::string & | fieldName | |||
| ) |
Determines whether a classification field is valid for export to a NITF 2.1 file.
| classification | The Classification object to validate. | |
| fieldName | The name of the field to validate. |
| bool Nitf::isClassificationValidForExport | ( | const Classification & | classification, | |
| std::string & | errorMessage | |||
| ) |
Determines whether a Classification object is valid for export to a NITF 2.1 file.
| classification | The Classification object to validate. | |
| errorMessage | An error message indicating the nature of the problem. |
| TreState Nitf::MaxState | ( | TreState | stateA, | |
| TreState | stateB | |||
| ) |
Determine the least trusted state of the provided TreStates.
| stateA | The first state to compare | |
| stateB | The second state to compare |
| bool Nitf::numReadErrMsg | ( | int64_t | numRead, | |
| int64_t | numBytes, | |||
| std::string & | errorMessage | |||
| ) |
Definition at line 936 of file NitfUtilities.h.
| bool Nitf::readAndConvertFromStream | ( | std::istream & | input, | |
| T & | output, | |||
| bool & | success, | |||
| const std::string & | name, | |||
| int | len, | |||
| std::string & | msg, | |||
| std::vector< char > & | buf, | |||
| bool | allBlankOk = false, |
|||
| bool | allDashesOk = false | |||
| ) |
Definition at line 990 of file NitfUtilities.h.
| bool Nitf::readField | ( | std::istream & | input, | |
| DynamicObject & | output, | |||
| bool & | success, | |||
| const std::string & | name, | |||
| int | len, | |||
| std::string & | msg, | |||
| std::vector< char > & | buf, | |||
| bool | allBlankOk = false, |
|||
| bool | allDashesOk = false | |||
| ) |
Definition at line 963 of file NitfUtilities.h.
| bool Nitf::readFieldErrMsg | ( | std::string & | msg, | |
| const std::string & | name, | |||
| const std::vector< char > & | buf, | |||
| int | len | |||
| ) |
Definition at line 925 of file NitfUtilities.h.
| bool Nitf::readFromStream | ( | std::istream & | strm, | |
| std::vector< char > & | buf, | |||
| std::streamsize | count, | |||
| bool | bStr = true | |||
| ) |
Reads a number of characters from a stream and places it in a vector of chars.
| strm | The source stream. | |
| buf | The destination vector for the data. | |
| count | The number of bytes to read from the stream. | |
| bStr | TRUE if the value read will need to be a NULL-terminated string. FALSE if the data will be treated as binary data. |
| std::string Nitf::sizeString | ( | const std::string & | str, | |
| unsigned int | size, | |||
| char | fillChar = ' ', |
|||
| bool | rightJustify = false | |||
| ) |
Cleans up a string for NITF export.
It guarantees the string is characters long. Left or right justified, as specified, if the string needs to be lengthened.
| str | The string to be cleaned up for NITF export | |
| size | The required length of the output string. | |
| fillChar | The character to fill with if the string needs to be lenghtened. Default is blank (' '). | |
| rightJustify | If true then the string is right justified, left justified otherwise. |
| TreState Nitf::testTagValidBcsASet | ( | const DynamicObject & | tre, | |
| std::ostream & | reporter, | |||
| unsigned int * | pNumFields, | |||
| const std::string & | name, | |||
| const std::set< std::string > & | testSet, | |||
| bool | allBlankOk = false, |
|||
| bool | notInSetOk = true, |
|||
| bool | emitMsgNotInSet = false | |||
| ) |
Test a tag to ensure valid BCS-A strings from within a set.
| tre | DynamicObject to get the test value from | |
| reporter | ostream to report errors to. | |
| pNumFields | Number of fields currently read in by the calling parser. If not NULL, this value is incremented if the field has been read. | |
| name | The name of the test value within the DynamicObject. | |
| testSet | Set of always allowed strings. | |
| allBlankOk | If true, it is valid to have an all blank (whitespace) string in the test value. | |
| notInSetOk | If true, it is valid to have the test value not occur in testSet. | |
| emitMsgNotInSet | If true, emit a message to reporter when the test value does not occur in testSet. |
| TreState Nitf::testTagValidBcsASet | ( | const std::string & | testValue, | |
| std::ostream & | reporter, | |||
| std::set< std::string > | testSet, | |||
| bool | allBlankOk = false, |
|||
| bool | notInSetOk = true, |
|||
| bool | emitMsgNotInSet = false | |||
| ) |
Test a tag to ensure valid BCS-A strings from within a set.
| testValue | String to test. | |
| reporter | ostream to report errors to. | |
| testSet | Set of always allowed strings. | |
| allBlankOk | If true, it is valid to have an all blank (whitespace) string in testValue. | |
| notInSetOk | If true, it is valid to have testValue not occur in testSet. | |
| emitMsgNotInSet | If true, emit a message to reporter when testValue does not occur in testSet. |
| TreState Nitf::testTagValueEq | ( | const DynamicObject & | tre, | |
| std::ostream & | reporter, | |||
| const std::string & | name, | |||
| const T & | eqValue | |||
| ) |
Test a tag within a DynamicObject for equivalence.
| tre | The DynamicObject to get the value from | |
| reporter | ostream to report failures to | |
| name | The name of the tag within the DynamicObject | |
| eqValue | The value to test equivalence against |
Definition at line 226 of file NitfUtilities.h.
| TreState Nitf::testTagValueNotEq | ( | const DynamicObject & | tre, | |
| std::ostream & | reporter, | |||
| const std::string & | name, | |||
| const T & | notEqValue | |||
| ) |
Test a tag within a DynamicObject for non-equivalence.
| tre | The DynamicObject to get the value from | |
| reporter | ostream to report failures to | |
| name | The name of the tag within the DynamicObject | |
| notEqValue | The value to test non-equivalence against |
Definition at line 262 of file NitfUtilities.h.
| TreState Nitf::testTagValueRange | ( | const DynamicObject & | tre, | |
| std::ostream & | reporter, | |||
| unsigned int * | pNumFields, | |||
| const std::string & | name, | |||
| const T & | minValue, | |||
| const T & | maxValue, | |||
| bool | optional = false | |||
| ) |
Test a tag within a DynamicObject against a range.
| tre | The DynamicObject from which to get the value. | |
| reporter | ostream To report failures. | |
| pNumFields | Number of fields currently read in by the calling parser. If not NULL, this value is incremented if the field has been read. | |
| name | The name of the tag within the DynamicObject. | |
| minValue | The minimum value of the range. | |
| maxValue | The maximum value of the range. | |
| optional | True if the field is considered to be optional (all spaces allowed). |
Definition at line 180 of file NitfUtilities.h.
| TreState Nitf::testTagValueRange | ( | std::ostream & | reporter, | |
| const T & | testValue, | |||
| const T & | minValue, | |||
| const T & | maxValue | |||
| ) |
Test a tag against a range.
| reporter | ostream to report failures to | |
| testValue | The value to test | |
| minValue | The minimum value of the range | |
| maxValue | The maximum value of the range |
Definition at line 147 of file NitfUtilities.h.
| std::string Nitf::toString | ( | T | num, | |
| unsigned int | size, | |||
| int | precision = -1, |
|||
| char | fillChar = '0', |
|||
| bool | posSign = false, |
|||
| bool | sciNotation = false, |
|||
| int | expSize = 3, |
|||
| bool | optional = false, |
|||
| char | optionalChar = ' ' | |||
| ) |
Converts a numeric to a string.
It only works with numeric intrinsics Guaranteed to be num characters long with a leading '-' if negative or a leading '+' if positive and posSign == true
| num | The numeric to be converted to a string. | |
| size | The required length of the output string. | |
| precision | For floating point the number of digits after the decimal point. Default == -1 which means to fit in the maximum within the allocated size. | |
| fillChar | The numeric fill character. Default == '0'. | |
| posSign | If true then output a leading "+" if the num is positive. | |
| sciNotation | If true then force scientific notation in the form: "+0.123456E+001" | |
| expSize | The number of digits in the exponent (where 1 <= expSize <= 3). | |
| optional | True if field can be exported as optional (with placeholders) if not present initially. | |
| optionalChar | The char to use when filling the field with a placeholder. |
Definition at line 720 of file NitfUtilities.h.
| bool Nitf::updateSpecialMetadata | ( | DynamicObject * | pMetadata, | |
| std::vector< double > & | centerWavelengths, | |||
| std::vector< double > & | startWavelengths, | |||
| std::vector< double > & | endWavelengths, | |||
| const std::vector< double > & | fwhms, | |||
| bool | convertFromInverseCentimeters = false | |||
| ) |
Updates band information in the special metadata, computing start, center, and end wavelengths from the given data if possible.
| pMetadata | The metadata to update. | |
| centerWavelengths | The center wavelengths to write or an empty vector if center wavelengths are unknown. | |
| startWavelengths | The start wavelengths to write or an empty vector if start wavelengths are unknown. | |
| endWavelengths | The end wavelengths to write or an empty vector if end wavelengths are unknown. | |
| fwhms | The FWHM for each band or an empty vector if FWHMs are unknown. | |
| convertFromInverseCentimeters | True if all data is in inverse centimeters, false if all data is in microns. |
True on success, false otherwise.
const bool Nitf::ALL_BLANK_FALSE = false [static] |
Definition at line 22 of file NitfConstants.h.
const bool Nitf::ALL_BLANK_TRUE = true [static] |
Definition at line 21 of file NitfConstants.h.
const std::string Nitf::DES_METADATA = "DES" [static] |
Definition at line 34 of file NitfConstants.h.
const bool Nitf::EMIT_MSG_NOT_IN_SET_FALSE = false [static] |
Definition at line 26 of file NitfConstants.h.
const bool Nitf::EMIT_MSG_NOT_IN_SET_TRUE = true [static] |
Definition at line 25 of file NitfConstants.h.
const std::string Nitf::FILE_HEADER = "File Header" [static] |
Definition at line 32 of file NitfConstants.h.
const std::string Nitf::IMAGE_SUBHEADER = "Image Subheader" [static] |
Definition at line 33 of file NitfConstants.h.
const std::string Nitf::NITF_METADATA = "NITF" [static] |
Definition at line 31 of file NitfConstants.h.
const bool Nitf::NOT_IN_SET_FALSE = false [static] |
Definition at line 24 of file NitfConstants.h.
const bool Nitf::NOT_IN_SET_TRUE = true [static] |
Definition at line 23 of file NitfConstants.h.
const int Nitf::ONE_EXP_DIGIT = 1 [static] |
Definition at line 29 of file NitfConstants.h.
const bool Nitf::POS_SIGN_FALSE = false [static] |
Definition at line 20 of file NitfConstants.h.
const bool Nitf::POS_SIGN_TRUE = true [static] |
Definition at line 19 of file NitfConstants.h.
const std::string Nitf::TRE_INFO_METADATA = "TRE Information" [static] |
Definition at line 36 of file NitfConstants.h.
const std::string Nitf::TRE_METADATA = "TRE" [static] |
Definition at line 35 of file NitfConstants.h.
const bool Nitf::USE_SCIENTIFIC_NOTATION = true [static] |
Definition at line 27 of file NitfConstants.h.
const std::string Nitf::VERSION_02_00 = "02.00" [static] |
Definition at line 38 of file NitfConstants.h.
const std::string Nitf::VERSION_02_10 = "02.10" [static] |
Definition at line 39 of file NitfConstants.h.
const char Nitf::ZERO_FILL = '0' [static] |
Definition at line 28 of file NitfConstants.h.