LNITFFile::GetNITFHeader

#include "ltwrappr.h"

L_INT LNITFFile::GetNITFHeader(pNITFHeader)

Retrieves the NITF file header information.

Parameters

pNITFHEADER pNITFHeader

Pointer to a NITFHEADER structure to be updated with the NITF file header information.

Returns

Value Meaning
SUCCESS The function was successful.
< 1 An error occurred. Refer to Return Codes.

Comments

To change the NITF file header information, call the LNITFFile::SetNITFHeader function.

Required DLLs and Libraries

See Also

Functions

Topics

Example

L_INT LNITFFile_GetNITFHeaderExample() 
{ 
   LNITFFile Nitf; 
   Nitf.Create (); 
   L_UINT uFlags = 0; 
 
   NITFHEADER NITFHeader;  
 
   memset(&NITFHeader, 0, sizeof(NITFHeader));  
 
   // Parse the NITF file 
   Nitf.Create (MAKE_IMAGE_PATH(TEXT("test.ntf"))); 
 
   // Check if the hNITF is empty or invalid 
   uFlags = Nitf.GetStatus (); 
   if((uFlags & NITF_FILE_EMPTY) == NITF_FILE_EMPTY)  
   { 
      MessageBox(NULL, TEXT("NITF file is empty"), 0, 0); 
      return SUCCESS; 
   } 
 
   if((uFlags & NITF_FILE_VALID) != NITF_FILE_VALID)  
   { 
      MessageBox(NULL, TEXT("NITF file is invalid"), 0, 0); 
      return SUCCESS; 
   } 
 
   // Update the NITF file header 
   if(Nitf.GetNITFHeader(&NITFHeader) == SUCCESS)  
   { 
      NITFHeader.pFTITLE = "LEAD Technologies, Inc"; 
      Nitf.SetNITFHeader (&NITFHeader); 
      Nitf.FreeNITFHeader (&NITFHeader); 
   } 
 
   Nitf.Destroy (); 
 
   return SUCCESS; 
} 
Help Version 21.0.2021.7.2
Products | Support | Contact Us | Intellectual Property Notices
© 1991-2021 LEAD Technologies, Inc. All Rights Reserved.

LEADTOOLS NITF C++ Class Library Help
Products | Support | Contact Us | Intellectual Property Notices
© 1991-2021 LEAD Technologies, Inc. All Rights Reserved.