Skip to content

NITF plugin

dromagnoli edited this page Feb 5, 2013 · 5 revisions

Table of Contents

ImageIO-EXT NITF Plugin

NITRO

Quoting from the NITRO page:

NITRO is a full-fledged, extensible library solution for reading and writing National Imagery Transmission Format (NITF) files, a U.S. Department of Defense standard format. It is written in cross-platform C, with bindings available for other languages

The ImageIO-EXT NITF plugin aims to provide an ImageWriter implementation on top of the NITRO NITF library through java bindings, as well as a basic reader. It also provide support for internally JP2K compressed imagery through the usage of the ImageIO-Ext Kakadu plugin.

Before you start doing any test with this plugin, you should acquire some knowledge about the NITF format in order to understand how it is structured, how you can put images, textes on it, how you can add additional information through Tagged Record Extensions and so on.

References

NITRO Installation

A set of required native libraries may be found at NITRO download page.
Build instructions to create .so/dll libraries are also provided by NITRO at this FAQ page.
Once created, make sure they are referred by the PATH/LD_LIBRARY_PATH environment variable depending on which OS are you using. Finally, make also sure to define a NITF_PLUGIN_PATH environment variable referring to the nitf\shared plugins folder (a wide list of native libs: ACCHZB, ACCPOB, ACCVTB, ...)

NITFImageWriter

Let us put together some information about how the NITFImageWriter works. Supported output types are instances of File and FileImageOutputStreamExt. All the required objects to be encoded as NITF (as well as the images) should be put inside a properly set NITFProperties instance to be specified as ImageWriteParam.

NITFProperties

This class holds each property to be encoded such as:

  • Header (through a HeaderWrapper instance)
  • List of text segments (through a List of TextWrapper instances)
  • List of image segments (through a List of ImageWrapper instances)

HeaderWrapper

Stores main information which can be specified inside the header like, as an instance, ID, Title, DateTime, Encryption type, Security ClassificationSystem, Security Classification, Originator Name, Originator Phone, Origin Station ID, Background Color, Title, ... Finally, it allows to specify a Map of TREs (Tagged Record Extensions).

TextWrapper

NITF may contain text segments which allows to store basic textual content, such as licenses, description, documentation, ... A TextWrapper instance allows to specify the underlying format of the text, the attachment Level, and the content itself (expressed as a byte[]), with the add of, as usual, basic information like ID, Title, DateTime, ...

ImageWrapper

This is where the image to be write should be put. The NITF specification allows to provide a wide set of auxiliary information for that image, like SubCategory, Representation, Band, Category, CoordinateSystem, Magnification, GeoLocation, Source, Comments, Compression... This information may be specified through the ImageWrapper instance. Finally the wrapper allows to specify a Map of TREs (Tagged Record Extensions)

Once all the wrappers have been properly configured, you can set all of them inside a NITFProperties instance and then specify it inside a NITFImageWriteParam