Introduction
Certain data sources ship data as multiple files with a single band in each file. Landsat and SPOT often ship data this way with each band in a GeoTIFF file. This HOWTO will show you two ways to get this data into Opticks as a single, multi-band data set.
Manually importing into Opticks
Opticks has the ability to import multifile BSQ data using the Generic Importer. The Generic Importer requires "raw" files. GeoTIFF is not a raw format and so the Generic Importer can't be used directly. The following process will convert the band files to a format which can be loaded with the Generic Importer and then will use the multifile BSQ functionality to combine the bands. This example will use Landsat ETM+ data from 1999. Bands 1-3 will be loaded as a single data set. The bands arrive as three GeoTIFF files: Band1.tif, Band2.tif, and Band3.tif.
- First, we import all three band files into Opticks.

- The next step is to export all the files in ENVI format.

- Now we select the Band1.hdr file in the Import dialog and click on Options. Make a note of the data properties.

- Cancel the Options and select the Generic Importer. We'll be setting the import Options for the Band1 file.

- In the File tab, fill in the details we gathered from the Band1.hdr file, except set the number of bands to the number of band files and select BSQ - multiple files. If the Data Type is not Unsigned 1 Byte, make sure to change this in the Data tab as well. In this example, the data is Unsigned 1 Byte so we'll keep the default setting.

- Finally, close the Options dialog and select Open. You'll have a single, 3 band data set. In this screen shot, I've set the band combination 3-Red, 2-Green, 1-Blue.

An external, automated process
The previous technique is useful if you have a small number of data sets which need to be converted but it is slow if you need to convert many data sets. It's possible to use an external tool to automate the conversion. This script uses the GDAL Python interface to combine multiple files into a single, multi-band GeoTIFF.
Comments (1)
Jan 30
Kirk Miller says:
This looks like what I need to do. I have 4 NITF files (nir, r, g, b) from...This looks like what I need to do. I have 4 NITF files (nir, r, g, b) from IKONOS, and I need to create RGB and false-color visualizations. I'm using Opticks 4.5.0. I tried the "Manually Importing into Opticks" steps (including export as ENVI / raw), but when I re-import in the generic importer, I only get 1/4 of the image area, and at the pixel-level, the image is a checkerboard of bright pixels and dark pixels. I've checked the bits/element, endian, etc., and I believe they're correct (tried several other permutations, too, no luck). Any suggestions? Thanks!