Package com.luciad.imaging.operator
Class TLcdColorConvertOp
java.lang.Object
com.luciad.imaging.operator.ALcdImageOperator
com.luciad.imaging.operator.TLcdColorConvertOp
Performs a color space conversion.
The supported conversions are:

indexed -> indexedindexed -> RGB + alphagray scale -> gray scalegray scale -> RGB (+ alpha)gray scale + alpha -> sRGB (+ alpha)RGB (+alpha) -> RGB (+ alpha)
Example
Convert to RGB default
// Using the static method:
ColorModel destinationColorModel = ColorModel.getRGBdefault();
ALcdImage inputImage = ...;
ALcdImage outputImage = TLcdColorConvertOp.colorConvert(inputImage, destinationColorModel);
// Using a data object:
ColorModel destinationColorModel = ColorModel.getRGBdefault();
ALcdImage inputImage = ...;
TLcdColorConvertOp op = new TLcdColorConvertOp();
ILcdDataObject params = op.getParameterDataType().newInstance();
params.setValue(TLcdColorConvertOp.INPUT_IMAGE, inputImage);
params.setValue(TLcdColorConvertOp.COLOR_MODEL, destinationColorModel);
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 TLcdDataTypeInput data type of the operator.static final TLcdDataPropertyTarget color model.static final TLcdDataPropertyThe input image.static final StringName 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 ALcdImagecolorConvert(ALcdImage aSource, ColorModel aColorModel) Perform a color conversion on an 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. -
COLOR_MODEL
Target color model. -
COLOR_CONVERT_FILTER_TYPE
Input data type of the operator.
-
-
Constructor Details
-
TLcdColorConvertOp
public TLcdColorConvertOp()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
-
colorConvert
Perform a color conversion on an image.- Parameters:
aSource- the input image.aColorModel- the target color model.- Returns:
- an image equivalent to the input image with the specified color model.
-