Package com.luciad.imaging.operator
Class TLcdColorLookupOp
java.lang.Object
com.luciad.imaging.operator.ALcdImageOperator
com.luciad.imaging.operator.TLcdColorLookupOp
Transforms one color to another using a lookup in a color table.
![](doc-files/color_lookup_out.png)
Example
// Using the static method:
ALcdColorLookupTable lut = ...;
ALcdImage inputImage = ...;
ALcdImage outputImage = TLcdColorLookupOp.colorLookup(inputImage, lut);
// Using a data object:
ALcdColorLookupTable lut = ...;
ALcdImage inputImage = ...;
TLcdColorLookupOp op = new TLcdColorLookupOp();
ILcdDataObject params = op.getParameterDataType().newInstance();
params.setValue(TLcdColorLookupOp.INPUT_IMAGE, inputImage);
params.setValue(TLcdColorLookupOp.LOOKUP_TABLE, lut);
ALcdImage outputImage = op.apply(params);
Input
![](doc-files/base_input.png)
Output
![](doc-files/color_lookup_out.png)
- 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 input image.static final TLcdDataProperty
Lookup table to use in the operation.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
colorLookup
(ALcdImage aSource, ALcdColorLookupTable aTable) Perfrom a color lookup operation 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. -
LOOKUP_TABLE
Lookup table to use in the operation. -
COLOR_LOOKUP_FILTER_TYPE
Input data type of the operator.
-
-
Constructor Details
-
TLcdColorLookupOp
public TLcdColorLookupOp()Default constructor.
-
-
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
-
colorLookup
Perfrom a color lookup operation on an image.- Parameters:
aSource
- the input image.aTable
- lookup table to use.- Returns:
- an image equivalent to the input, with every value replaced by its corresponding entry in the lookup table.
-