BlueSpray - Help
© SchoonerTurtles, Inc. 2012-2015

Introduction
Contents
Getting Started
Download
Navigating
Tutorials
Scripting
Advanced
About

Class STBandCopier

Extends STTransformRaster

Handles copying bands between rasters. Can be used to extract bands from a
raster into a new raster or to insert a band from a raster into an existing
raster (insert).


Copyright, SchoonerTurtles LLP, 2009
@author Jim Graham

Static Functions

ReturnsFunctionThrows
STRaster ConvertToRGB(STRaster TheRaster) Exception
STRaster ExtractBands(STRaster TheInput,int[] SourceBands) Exception

Static Functions


STRaster ConvertToRGB(STRaster TheRaster) Exception

Converts a raster to an RGB image as follows:
- Grayscale: RGB bands all will contain the grayscale value
- Palette: Pixels are replaced with their RGB values from the palette
- 2 Bands: Red gets the first band while Blue and Green get the second
- 3 Bands: Red=band 1, Green=band 2, Blue=band 3

Parameters:
    TheRaster - raster to convert to RGB
Returns: - a new RGB raster. The bounds and data type do not change
Throws: Exception


STRaster ExtractBands(STRaster TheInput,int[] SourceBands) Exception

Extract bands from an existing raster and puts them in a new raster. Examples
include pulling the red band from an RGB image, pulling the mask from an
RGBA image, etc.

Parameters:
    TheInput - raster to extract bands from
    SourceBands - Array of the band indexes into the input raster to exract for the