public class TLcdResizeOp extends ALcdImageOperator
// Using the static method:
ALcdImage inputImage = ...;
ALcdImage outputImage = TLcdResizeOp.resize(inputImage, 0.1, 0.1);
// Using a data object:
ALcdImage inputImage = ...;
TLcdResizeOp op = new TLcdResizeOp();
ILcdDataObject params = op.getParameterDataType().newInstance();
params.setValue(TLcdResizeOp.INPUT_IMAGE, inputImage);
params.setValue(TLcdResizeOp.SCALE_X, 0.1);
params.setValue(TLcdResizeOp.SCALE_Y, 0.1);
ALcdImage outputImage = op.apply(params);
ALcdImageOperator.ImageOperatorTypeBuilder
Modifier and Type | Field and Description |
---|---|
static TLcdDataProperty |
INPUT_IMAGE
The input image.
|
static String |
NAME
Name of the operator.
|
static TLcdDataType |
RESIZE_FILTER_TYPE
Input data type of the operator.
|
static TLcdDataProperty |
SCALE_X
The scale factor in the x direction.
|
static TLcdDataProperty |
SCALE_Y
The scale factor in the y direction.
|
INPUT_IMAGE_NAME
Constructor and Description |
---|
TLcdResizeOp()
Default constructor.
|
Modifier and Type | Method and Description |
---|---|
ALcdImage |
apply(ILcdDataObject aParameters)
Applies this operator to the given input parameters.
|
static ALcdImage |
resize(ALcdImage aSource,
double aScaleX,
double aScaleY)
Creates a resize 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 SCALE_X
public static final TLcdDataProperty SCALE_Y
public static final TLcdDataType RESIZE_FILTER_TYPE
public final ALcdImage apply(ILcdDataObject aParameters)
ALcdImageOperator
apply
in class ALcdImageOperator
aParameters
- the parameters for the operatorpublic static ALcdImage resize(ALcdImage aSource, double aScaleX, double aScaleY)
aSource
- the image to be processedaScaleX
- the scale factor in the x directionaScaleY
- the scale factor in the y direction