How to split a multi-band image into a series of single-band images?
For example, one multispectral image has 220 bands. I want to obtain 220 Images with 1 band.
Image number "1" contains band 1 of multispectral image. Image number "2" contains band 2 of multispectral image. ... Image number "220" contains band 220 of multispectral image.
Note: This article applies to IMAGINE versions 16.00 or lower. IMAGINE version 16.01 uses a different model that this article does not appy to. A model is attached to this article that has comparable functionality and runs with IMAGINE versions 16.00 and 16.01 (but not with IMAGINE version 15.00).
First, create the text file that contains a list with the full path and filename of the input image along with a single band number on each line. The filename and band number must be separated by a single space and a single space must be added to the end of each line. An example of how your text file will look is provided below:
7. Select the Edit button. From the Variable Editor dialogue, click the Add button. Rename the NEW VARIABLE to Input2.
8. Select the variable named Output1. Edit the Pattern line and insert $(Input2) after $(Input1.root). The new pattern line should read like this: e:/docs/batch_kb/$(Input1.pathright)$(Input2)___band.img. Then click Close.
9. The new variable Input2 is added to the Variable Values list. Edit the command line and replace the value 1 (after Integer) with $(Input2).