nitf-rs

A rust NITF file interface

Current project goals are - Finish implementing version 2.1 reading (maybe writing) - Verify header/subheader field entries (see NitfField - Implement logic for various header/subheader inputs - For example, return data from an image segment as an array with the appropriate format (right now only Complex32 supported) - Expand with features for various applications of the standard (SICD as a first step)

Example

In your Cargo.toml, include nitf-rs as a dependency, or, for the 'latest-and-greatest' features.. toml nitf-rs = {git="https://github.com/holmesv3/nitf-rs.git"}

Usage

```rust use nitfrs::readnitf; use std::path::Path; // Define a string which is the path to some nitf file let nitffile: String = getnitffile(); let nitfpath = Path::new(&nitf_file);

// Read the file and print all metadata let nitf = readnitf(nitfpath); println!("{}", &nitf);

// Read image data, check that the dimensions are what we expect let imseg = &nitf.imagesegments[0]; let data = imseg.datatoarray(); println!("Meta NROWS: {}, data.nrows(): {}", imseg.meta.NROWS.val, data.nrows()); println!("Meta NCOLS: {}, data.ncols(): {}", im_seg.meta.NCOLS.val, data.ncols());

// If you have a SICD file, parse and print the metadata let sicdmeta = &nitf.parsesicdmeta().unwrap(); println!("{:#?}", sicdmeta); ```

Current Functionality

In my own testing, I have only been able to find files to verify parsing for: - Header - Image Segments - Data Extension Segments - Sicd xml metadata parsing

To the best of my knowledge, these function as expected.

There is no logic built around the inputs yet (in progress)

New from last version (that I remember)

If you have questions, would like to contribute, or would like to request something be added, you can ask on this Discord server, or create an issue.

Next in line