Hi everyone,

Sorry for the delay on this.  Some finishing touches took longer than expected.  Finally though, I've checked in some new NITF reading classes into VIL.  The newly added files are listed below.  This code was authored from scratch by myself and Harry Voorhees (hlv@stellarscience.com).  We decided to use the file prefix 'vil_nitf2' so these new files won't be confused with the old NITF reading files (vil_nitf*) which have no relation.  The ‘2’ is also appropriate because the class reads NITF 2.0 and 2.1 imagery (but not NITF 1.0 files).

 

Even though there are a lot of files, most people will only be concerned with the vil_nitf2_image class and possibly the header classes (vil_nitf2_image_subheader and vil_nitf2_header) if you care about the data stored within those headers.  The TRE framework could be useful to anyone who wishes to create code that will parse a custom TRE.  Currently no TREs are implemented, but both the file and image headers use these classes to parse themselves.  Ie. They are required.  Harry can send out more information regarding this TRE work if anyone is interested (he's the mastermind behind that portion of the code).

 

vil_nitf2_image has been tested extensively with sample files obtained from NGA's website.  It can handle a lot of NITF variations including all four uncompressed image formats, many channels per image and even many images per file.  One of my next tasks will be to add some unit tests to the VIL testing framework.  I may need some advice as far as this is concerned.  I noticed that all the sample image files (in vil/tests/file_read_data) are really small (~ 1kb).  The majority of the sample NITF data I have is quite a bit larger.  Would we prefer to keep larger image files out of the CVS repository? 

 

vil_nitf2_image.h contains a lot of detail about the classes features and limitations.  Another thing worth mentioning is that vil_nitf2_image has plug-in support for JPEG 2000 compressed NITF files.  We have created custom VIL classes that can be plugged in but they depend heavily on a third party library (ECW JPEG2000 SDK -- www.ermapper.com).  At this point, it is unclear to me whether or not that SDK's license would permit us to submit our vil_j2k_image classes to VXL (it is freely available, but...).  Besides for that, it may be quite a challenge to get that library compiled on all VXL supported platforms.  This is why I have not checked in any of the JPEG 2000 support.  We can re-visit this later if others are interested. 

 

I've modified the VIL CMakeLists.txt file to include these new files so they are now in the build.  I imagine that the dashboard will start peppering me with build error messages.  I'll try to resolve these issues as quickly as I can.  If this is a bad time for me to do all this, please speak up and I'll comment out these new files from vil's CMakeLists.txt.

 

Rob

 

  ################################
  # NITF 2.0 and 2.1 reading code
  ################################
  # The actual vil_image_resource subclass
  file_formats/vil_nitf2_image.h                    file_formats/vil_nitf2_image.cxx

 

  # For reading the NITF file headers as well as the image headers
  file_formats/vil_nitf2_header.h                   file_formats/vil_nitf2_header.cxx
  file_formats/vil_nitf2_image_subheader.h          file_formats/vil_nitf2_image_subheader.cxx

 

  # Stuff shared by all NITF2 classes
  file_formats/vil_nitf2.h
 
  # Generic framework for reading NITF tagged record extensions (TREs)
  file_formats/vil_nitf2_array_field.h              file_formats/vil_nitf2_array_field.cxx
  file_formats/vil_nitf2_classification.h           file_formats/vil_nitf2_classification.cxx
  file_formats/vil_nitf2_compound_field_value.h     file_formats/vil_nitf2_compound_field_value.cxx
  file_formats/vil_nitf2_data_mask_table.h          file_formats/vil_nitf2_data_mask_table.cxx
  file_formats/vil_nitf2_field.h                    file_formats/vil_nitf2_field.cxx
  file_formats/vil_nitf2_field_definition.h         file_formats/vil_nitf2_field_definition.cxx
  file_formats/vil_nitf2_field_formatter.h          file_formats/vil_nitf2_field_formatter.cxx
  file_formats/vil_nitf2_field_functor.h            file_formats/vil_nitf2_field_functor.cxx
  file_formats/vil_nitf2_field_sequence.h           file_formats/vil_nitf2_field_sequence.cxx
  file_formats/vil_nitf2_index_vector.h            
  file_formats/vil_nitf2_scalar_field.h             file_formats/vil_nitf2_scalar_field.cxx
  file_formats/vil_nitf2_tagged_record.h            file_formats/vil_nitf2_tagged_record.cxx
  file_formats/vil_nitf2_tagged_record_definition.h file_formats/vil_nitf2_tagged_record_definition.cxx
  file_formats/vil_nitf2_typed_array_field.h       
  file_formats/vil_nitf2_typed_scalar_field.h      
  file_formats/vil_nitf2_typed_field_formatter.h    file_formats/vil_nitf2_typed_field_formatter.cxx