Package com.luciad.imaging.operator
Class TLcdBandSelectOp
java.lang.Object
com.luciad.imaging.operator.ALcdImageOperator
com.luciad.imaging.operator.TLcdBandSelectOp
Extracts a subset of the color bands of an image and/or reorders the bands.
Example
Input
Output

For color data the bands should generally not be re-ordered. Otherwise they may or may not be interpreted as a color
anymore. See here
for details.
Example 
// Using the static method:
ALcdImage inputImage = ...;
int[] bands = new int[]{0};
ALcdImage outputImage = TLcdBandSelectOp.bandSelect(inputImage, bands);
// Using a data object:
ALcdImage inputImage = ...;
int[] bands = new int[]{0};
TLcdBandSelectOp op = new TLcdBandSelectOp();
ILcdDataObject params = op.getParameterDataType().newInstance();
params.setValue(TLcdBandSelectOp.INPUT_IMAGE, inputImage);
params.setValue(TLcdBandSelectOp.INPUT_BANDS, bands);
ALcdImage outputImage = op.apply(params);
Input 

Output 

- Since:
- 2014.0
-
Nested Class Summary
Nested classes/interfaces inherited from class com.luciad.imaging.operator.ALcdImageOperator
ALcdImageOperator.ImageOperatorTypeBuilder
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final TLcdDataType
Input data type of the operator.static final TLcdDataProperty
The indices of the bands to be retained, in the order in which they are to appear in the output.static final TLcdDataProperty
The input image.static final String
Name of the operator.Fields inherited from class com.luciad.imaging.operator.ALcdImageOperator
INPUT_IMAGE_NAME
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionapply
(ILcdDataObject aParameters) Applies this operator to the given input parameters.static ALcdImage
bandSelect
(ALcdImage aSource, int[] aBands) Extracts a subset of the bands from the given image and/or reorders the bands.Methods inherited from class com.luciad.imaging.operator.ALcdImageOperator
createTypeBuilder, createTypeBuilder, equals, getParameterDataType, hashCode, toString
-
Field Details
-
Constructor Details
-
Method Details
-
apply
Description copied from class:ALcdImageOperator
Applies this operator to the given input parameters. The parameters are stored in a data object which must be of the type given by ALcdImageOperator.getParameterDataType().- Specified by:
apply
in classALcdImageOperator
- Parameters:
aParameters
- the parameters for the operator- Returns:
- the image produced by the operator
-
bandSelect
Extracts a subset of the bands from the given image and/or reorders the bands.- Parameters:
aSource
- the image to be processedaBands
- the indices of the bands to be retained, in the order in which they are to appear in the output- Returns:
- image containing only the specified bands of the source image
-