[ Beneath the Waves ]

TMSB XML Schema Part 3: Output Configuration

article by Ben Lincoln

 

The output configuration file determines what TMSB will write to disk during processing - both intermediate images and the final output.

Note: the FileType value in the metadata section of the file must be Output Configuration.

Schema

<OutputConfig>

<OutputOptions>

<RegenerateExistingFiles>

A boolean (true/false) value

</RegenerateExistingFiles>

<RenameAllBandsFiles>

A boolean (true/false) value

</RenameAllBandsFiles>

<RenameRGBFiles>

A boolean (true/false) value

</RenameRGBFiles>

</OutputOptions>

<OutputFormats>

<OutputFormat>

<OutputFileType>

See below

</OutputFileType>

<BitsPerChannel>

See below

</BitsPerChannel>

<Scaling>

<ScaleMode>

None

</ScaleMode>

<ScaleValue>

1

</ScaleValue>

</Scaling>

</OutputFormat>

</OutputFormats>

</OutputConfig>

Notes

RegenerateExistingFiles controls how TMSB will react if any of the output files already exist in one of the working directories. If this value is false, then any existing files will not be regenerated (which can save considerable processing time if the user is performing multiple passes with similar configurations). If this value is true, then any existing files will be overwritten. This value is set to false in all of the output configuration files included with TMSB.

RenameAllBandsFiles controls whether or not TMSB will replace with "All Bands" strings in filenames that indicate the presence of all input bands (for example, when using the NIR-R-G-B-UVA input configuration, "NIR-R-G-B-UVA"). This value is set to true in all of the output configuration files included with TMSB, in order to conserve space in filenames and also to make it extremely obvious which files are of that type.

RenameRGBFiles controls whether or not TMSB will replace with "R-G-B" strings in filenames that indicate the presence of that three-channel image variation (that is, the image as it would more or less appear to human eyes). This is mostly to pick a nit and remove the "FC-" ("False Colour") prefix from such filenames. This value is set to true in all of the output configuration files included with TMSB.

At least one OutputFormat block must be specified if you want TMSB to do anything useful. In addition, be aware that the first block of this type defines the image format that is also used for "internal processing" - IE images which are later referenced in the creation of other images. As a result, if you are specifying multiple output filetypes, and especially if some of those filetypes are compressed using a lossy format, you should define the highest-quality type first in the output configuration file.

OutputFileType may be any of the following values:

TIFF
PNG
JPEG

BitsPerChannel controls the number of bits per channel in output images. For JPEG output, this value must always be 8 (because the JPEG file format does not support 16-bit-per-channel images). For PNG, values of 8 or 16 are allowed. For TIFF output, values of 8, 16, or 32 are allowed. Please note that 32-bit TIFF support has not been tested extensively and may cause issues.

Important: An 8-bit-per-channel RGB image is commonly referred to as "24-bit", and a 16-bit-per-channel RGB image is sometimes referred to as "48-bit". The "per-channel" notation is used here because the value is also used for e.g. greyscale images that have only one channel.

The entire Scaling section is irrelevant at this time, because scaled output is not supported by the current build of TMSB. The values indicated above are simply a reminder of this fact. Some of the files included with TMSB may specify other values for certain output formats (which were specified for testing purposes), but these alternate values are not used.

Important: The current version of TMSB does not allow multiple output formats with the same filetype to be named differently. So, for example, if both 8-bit-per-channel and 16-bit-per-channel TIFF output exists in the same output configuration, the files of the second type will overwrite the first (rather than being created as an additional set of files). Support for this type of output is planned at the same time as scaled output images. In the meantime, only specify each output type one type at most in a given output configuration!

Example

This file defines two output formats: 16-bit-per-channel TIFF (which is used for internal processing by TMSB, ensuring high output quality), and 8-bit-per-channel JPEG (which occupies much less space on disk). I use this example configuration for my processing so that I can select the images I like best, then delete the other TIFFs (freeing up disk space), but retain the JPEGs so that if I ever wonder if I missed out on any interesting permutations, I can look through the JPEGs instead of having to run through the (potentially lengthy) processing again.

<OutputConfig>

<OutputOptions>

<RegenerateExistingFiles>

false

</RegenerateExistingFiles>

<RenameAllBandsFiles>

true

</RenameAllBandsFiles>

<RenameRGBFiles>

true

</RenameRGBFiles>

</OutputOptions>

<OutputFormats>

<OutputFormat>

<OutputFileType>

TIFF

</OutputFileType>

<BitsPerChannel>

16

</BitsPerChannel>

<Scaling>

<ScaleMode>

None

</ScaleMode>

<ScaleValue>

1

</ScaleValue>

</Scaling>

</OutputFormat>

<OutputFormat>

<OutputFileType>

JPEG

</OutputFileType>

<BitsPerChannel>

8

</BitsPerChannel>

<Scaling>

<ScaleMode>

None

</ScaleMode>

<ScaleValue>

1

</ScaleValue>

</Scaling>

</OutputFormat>

</OutputFormats>

</OutputConfig>

 
[ Page Icon ]