public final class TLcdHistogramOp extends ALcdImageOperator
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.
// 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);
ALcdImageOperator.ImageOperatorTypeBuilder
Modifier and Type | Field and Description |
---|---|
static TLcdDataProperty |
BIN_COUNT
Number of bins in the resulting histogram.
|
static TLcdDataType |
HISTOGRAM_FILTER_TYPE
Input data type of the operator.
|
static TLcdDataProperty |
INPUT_IMAGE
The input image.
|
static String |
NAME
Name of the operator.
|
INPUT_IMAGE_NAME
Constructor and Description |
---|
TLcdHistogramOp()
Default constructor.
|
Modifier and Type | Method and Description |
---|---|
ALcdImage |
apply(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.
|
createTypeBuilder, createTypeBuilder, equals, getParameterDataType, hashCode, toString
public static final String NAME
public static final TLcdDataProperty INPUT_IMAGE
public static final TLcdDataProperty BIN_COUNT
public static final TLcdDataType HISTOGRAM_FILTER_TYPE
public ALcdImage apply(ILcdDataObject aParameters)
ALcdImageOperator
apply
in class ALcdImageOperator
aParameters
- the parameters for the operatorpublic static ALcdImage histogram(ALcdBasicImage aSource, int aBinCount)
aSource
- the image to be processedaBinCount
- the number of bins of the resulting histogram