Split a N multiband image into N images.


This application splits a N-bands image into N mono-band images. The output images filename will be generated from the output parameter. Thus, if the input image has 2 channels, and the user has set as output parameter, outimage.tif, the generated images will be outimage_0.tif and outimage_1.tif.

This application has several output images and supports “multi-writing”. Instead of computing and writing each image independently, the streamed image blocks are written in a synchronous way for each output. The output images will be computed strip by strip, using the available RAM to compute the strip size, and a user defined streaming mode can be specified using the streaming extended filenames (type, mode and value). Note that multi-writing can be disabled using the multi-write extended filename option: &multiwrite=false, in this case the output images will be written one by one. Note that multi-writing is not supported for MPI writers.


Input Image -in image Mandatory
Input multiband image filename.

Output Image -out image [dtype] Mandatory
The output filename will be used to get the prefix an the extension of the output written’s image. For example with outimage.tif as output filename, the generated images will had an indice (corresponding at each bands) between the prefix and the extension, such as: outimage_0.tif and outimage_1.tif (if 2 bands).

Available RAM (MB) -ram int Default value: 256
Available memory for processing (in MB).


From the command-line:

otbcli_SplitImage -in VegetationIndex.hd -out splitImage.tif

From Python:

import otbApplication

app = otbApplication.Registry.CreateApplication("SplitImage")

app.SetParameterString("in", "VegetationIndex.hd")
app.SetParameterString("out", "splitImage.tif")