Package com.luciad.imaging.operator
Class TLcdHistogramOp
java.lang.Object
com.luciad.imaging.operator.ALcdImageOperator
com.luciad.imaging.operator.TLcdHistogramOp
Computes a histogram of a given image. Produces a one-dimensional output
image with integer components.
When the input image consists of multiple bands, the resulting one-dimensional output image will consist of multiple bands as well. I.e., a histogram is computed for each band in the input image.
Example
// Using the static method:
ALcdImage inputImage = ...;
int binCount = ...;
ALcdImage outputImage = TLcdHistogramOp.histogram(inputImage,binCount);
// Using a data object:
ALcdImage inputImage = ...;
TLcdHistogramOp op = new TLcdHistogramOp();
ILcdDataObject params = op.getParameterDataType().newInstance();
params.setValue(TLcdHistogramOp.INPUT_IMAGE,image);
params.setValue(TLcdHistogramOp.BIN_COUNT,binCount);
ALcdImage outputImage = op.apply(params);
- Since:
- 2014.0
-
Nested Class Summary
Nested classes/interfaces inherited from class com.luciad.imaging.operator.ALcdImageOperator
ALcdImageOperator.ImageOperatorTypeBuilder
-
Field Summary
Modifier and TypeFieldDescriptionstatic final TLcdDataProperty
Number of bins in the resulting histogram.static final TLcdDataType
Input data type of the operator.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
-
Method Summary
Modifier and TypeMethodDescriptionapply
(ILcdDataObject aParameters) Applies this operator to the given input parameters.static ALcdImage
histogram
(ALcdBasicImage aSource, int aBinCount) Creates a histogram operator for a given 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. -
BIN_COUNT
Number of bins in the resulting histogram. -
HISTOGRAM_FILTER_TYPE
Input data type of the operator.
-
-
Constructor Details
-
TLcdHistogramOp
public TLcdHistogramOp()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
-
histogram
Creates a histogram operator for a given input image.- Parameters:
aSource
- the image to be processedaBinCount
- the number of bins of the resulting histogram- Returns:
- the histogram operator
-