All Implemented Interfaces:
Serializable, Operation

public class Scale extends BaseScaleOperationJAI
This operation is simply a wrapper for the ImageN scale operation which allows me to arbitrarily scale and translate a rendered image.
Since:
2.3
Author:
Simone Giannecchini
See Also:
  • Constructor Details

    • Scale

      public Scale()
      Default constructor.
  • Method Details

    • createRenderedImage

      protected RenderedImage createRenderedImage(ParameterBlockImageN parameters, RenderingHints hints)
      Description copied from class: OperationJAI
      Applies the ImageN operation. The operation name can be fetch from OperationJAI.operation. The ImageN instance to use can be fetch from OperationJAI.getJAI(java.awt.RenderingHints). The default implementation returns the following:
       getJAI(hints).createNS(OperationJAI.operation.getName(), parameters, hints)
       
      Subclasses may override this method in order to invokes a different ImageN operation according the parameters.
      Overrides:
      createRenderedImage in class OperationJAI
      Parameters:
      parameters - The parameters to be given to ImageN.
      hints - The rendering hints to be given to ImageN.
      Returns:
      The result of ImageN operation using the given parameters and hints.
    • handleJAIEXTParams

      protected void handleJAIEXTParams(ParameterBlockImageN parameters, ParameterValueGroup parameters2)
      Description copied from class: OperationJAI
      Extension point for adding to the ImageN ParameterBlockImageN object the parameters defined in the ParameterValueGroup, which can be read by the JAI-EXT operations.

      Notice that if you are using JAI, the new parameters will not be accepted by the ParameterBlockImageN instance.

      Overrides:
      handleJAIEXTParams in class OperationJAI
      Parameters:
      parameters - ParameterBlockImageN instance used by the current JAI-EXT/JAI operation
      parameters2 - ParameterValueGroup instance containing input operation parameters
    • getProperties

      protected Map<String,?> getProperties(RenderedImage data, CoordinateReferenceSystem crs, InternationalString name, MathTransform gridToCRS, GridCoverage2D[] sources, OperationJAI.Parameters parameters)
      Description copied from class: OperationJAI
      Prepares the properties to be given to the coverage created by the deriveGridCoverage method. The default implementation returns null.
      Overrides:
      getProperties in class OperationJAI
      Parameters:
      data - The RenderedImage created by this operation.
      crs - The coordinate reference system assigned to the coverage this OperationJAI will produce.
      name - The name assigned to the coverage this OperationJAI will produce.
      gridToCRS - The transform from grid to crs to be assigned to the coverage this OperationJAI will produce.
      sources - The sources to be assigned to the coverage this OperationJAI will produce.
      parameters - The parameters that were used by this OperationJAI.
      Returns:
      a Map with the properties generated by this OperationJAI or null if we haven't any.