Class TLcdResizeOp

java.lang.Object
com.luciad.imaging.operator.ALcdImageOperator
com.luciad.imaging.operator.TLcdResizeOp

public class TLcdResizeOp extends ALcdImageOperator
Resizes an image, changing its resolution. The resulting resolution is the rounded result of the scales multiplied with the input resolution. The bounds of the image will remain unchanged.

Example


 // 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);
 
Input
Output
Since:
2014.0
  • Field Details

    • NAME

      public static final String NAME
      Name of the operator.
      See Also:
    • INPUT_IMAGE

      public static final TLcdDataProperty INPUT_IMAGE
      The input image.
    • SCALE_X

      public static final TLcdDataProperty SCALE_X
      The scale factor in the x direction.
    • SCALE_Y

      public static final TLcdDataProperty SCALE_Y
      The scale factor in the y direction.
    • RESIZE_FILTER_TYPE

      public static final TLcdDataType RESIZE_FILTER_TYPE
      Input data type of the operator.
  • Constructor Details

    • TLcdResizeOp

      public TLcdResizeOp()
      Default constructor.
  • Method Details

    • apply

      public final ALcdImage apply(ILcdDataObject aParameters)
      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 class ALcdImageOperator
      Parameters:
      aParameters - the parameters for the operator
      Returns:
      the image produced by the operator
    • resize

      public static ALcdImage resize(ALcdImage aSource, double aScaleX, double aScaleY)
      Creates a resize operator for a given input image. The operator takes a scale factor for x and y as input.
      Parameters:
      aSource - the image to be processed
      aScaleX - the scale factor in the x direction
      aScaleY - the scale factor in the y direction
      Returns:
      the resize operator