Skip to content

NITRO Code Snippets

anna-dodd edited this page Jun 3, 2015 · 18 revisions

This page contains snippets of code, and sometimes mini-tutorials showing how to use portions of the NITRO API. The snippets are not necessarily full programs, but they are chunks of code that developers can use to learn the basic functionality. The page is divided into sections for each released binding (currently C and Java) and for each version of the library.


Listing

  • Reading an image from a NITF file

  • Writing a NITF file from scratch (New)
    • 1.5/2.0 C

  • Reading an image using Java imageio code

  • Reading and manipulating XML Data from TREs (INDXMA, TXML1A)

  • Reading and manipulating XML Data from the DESDATA (SICD_XML)









  • Writing out a file using Java imageio


  • Writing out data with a DES



  • Extensions: Writing a basic TRE processing plug-in
    • 1.5 C
    • 2.0 C

  • Extensions: Writing an advanced processing TRE plug-in
    • 2.0 C

  • Extensions: Writing an image decompression plug-in
    • 1.5 C
    • 2.0 C


Full Samples
  • C
    • a JPEG and putting it into an image segment as compressed data
    • Our test cases currently serve the dual-purpose of also being examples for how to use the library
  • Java
    • You can find Java samples in the repository here:
  • Python
    • nitf_print.py
      • Shows how to access different components of the NITF Record
      • Prints all header metadata to stdout
    • nitf_extract.py
      • Shows how to read image data and save to a file
      • piwik

Clone this wiki locally