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 Link icon


 // 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 Link icon
Output Link icon
Since:
2014.0
  • Field Details Link icon

    • NAME Link icon

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

      public static final TLcdDataProperty INPUT_IMAGE
      The input image.
    • SCALE_X Link icon

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

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

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

    • TLcdResizeOp Link icon

      public TLcdResizeOp()
      Default constructor.
  • Method Details Link icon

    • apply Link icon

      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 Link icon

      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