Package com.luciad.imaging.operator
Class TLcdBandMergeOp
java.lang.Object
com.luciad.imaging.operator.ALcdImageOperator
com.luciad.imaging.operator.TLcdBandMergeOp
Merges the bands of two images together.
The bands of the second image are added sequentially to the first, without reordering.
Band merging is currently restricted to a maximum of 4 bands. This operator can for example
be used to merge three grayscale bands and

interpret them
as RGB. 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:
ALcdBasicImage redImage = ...;
ALcdBasicImage greenImage = ...;
ALcdBasicImage blueImage = ...;
ALcdBasicImage outputImage =
TLcdBandMergeOp.bandMerge(
TLcdBandMergeOp.bandMerge(redImage, greenImage),
blueImage
);
// Using a data object:
ALcdBasicImage redImage = ...;
ALcdBasicImage greenImage = ...;
ALcdBasicImage blueImage = ...;
TLcdBandMergeOp op = new TLcdBandMergeOp();
ILcdDataObject params = op.getParameterDataType().newInstance();
params.setValue(TLcdBandMergeOp.INPUT_IMAGE, redImage);
params.setValue(TLcdBandMergeOp.SECOND_IMAGE, greenImage);
ALcdBasicImage outputImage = op.apply(params);
params = op.getParameterDataType().newInstance();
params.setValue(TLcdBandMergeOp.INPUT_IMAGE, outputImage);
params.setValue(TLcdBandMergeOp.SECOND_IMAGE, blueImage);
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 TLcdDataTypeInput data type of the operator.static final TLcdDataPropertyThe input image.static final StringName of the operator.static final TLcdDataPropertyThe image to band merge the input image with.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 ALcdBasicImagebandMerge(ALcdBasicImage aInputImage, ALcdBasicImage aSecondImage) Create a band merge operator with a specified input image.Methods inherited from class com.luciad.imaging.operator.ALcdImageOperator
createTypeBuilder, createTypeBuilder, equals, getParameterDataType, hashCode, toString
-
Field Details
-
NAME
Name of the operator.- See Also:
-
INPUT_IMAGE
The input image. -
SECOND_IMAGE
The image to band merge the input image with. -
BAND_MERGE_FILTER_TYPE
Input data type of the operator.
-
-
Constructor Details
-
TLcdBandMergeOp
public TLcdBandMergeOp()Default constructor.
-
-
Method Details
-
apply
Description copied from class:ALcdImageOperatorApplies 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:
applyin classALcdImageOperator- Parameters:
aParameters- the parameters for the operator- Returns:
- the image produced by the operator
-
bandMerge
Create a band merge operator with a specified input image.- Parameters:
aInputImage- the input image.aSecondImage- the image to band merge the input image with.- Returns:
- a new band merge operator.
-