Class Rescale

  • All Implemented Interfaces:
    Serializable, Operation

    public class Rescale
    extends OperationJAI
    Maps the sample values of a coverage from one range to another range. The rescaling is done by multiplying each sample value by one of a set of constants and then adding another constant to the result of the multiplication. The destination sample values are defined by the pseudocode:
    dst[x][y][b] = src[x][y][b]*constant + offset;

    Name: "Rescale"
    JAI operator:  "Rescale"

    Name Class Default value Minimum value Maximum value
    "Source" GridCoverage2D N/A N/A N/A
    "constants" double[] 1.0 N/A N/A
    "offsets" double[] 0.0 N/A N/A
    Martin Desruisseaux (IRD)
    See Also:
    Operations.rescale(org.geotools.api.coverage.Coverage, double[], double[]), RescaleDescriptor, Serialized Form
    • Constructor Detail

      • Rescale

        public Rescale()
        Constructs a default "Rescale" operation.
    • Method Detail

      • deriveRange

        protected NumberRange<? extends Number> deriveRange​(NumberRange<? extends Number>[] ranges,
                                                            OperationJAI.Parameters parameters)
        Returns the expected range of values for the resulting image.
        deriveRange in class OperationJAI
        ranges - The range of values from every sources. For unary operations this array has a length of 1. For binary operations like "add" and "multiply", this array has a length of 2.
        parameters - Parameters, rendering hints and coordinate reference system to use.
        The range of values to use in the destination image, or null if unknow.
      • handleJAIEXTParams

        protected void handleJAIEXTParams​(ParameterBlockJAI parameters,
                                          ParameterValueGroup parameters2)
        Description copied from class: OperationJAI
        Extension point for adding to the JAI ParameterBlockJAI 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 ParameterBlockJAI instance.

        handleJAIEXTParams in class OperationJAI
        parameters - ParameterBlockJAI instance used by the current JAI-EXT/JAI operation
        parameters2 - ParameterValueGroup instance containing input operation parameters