Class Invert

  • All Implemented Interfaces:
    Serializable, Operation

    public class Invert
    extends BaseMathOperationJAI
    Inverts the sample values of a coverage. For source coverages with signed data types, the sample values of the destination coverage are defined by the pseudocode:
     dst[x][y][b] = -src[x][y][b]
     

    Name: "Invert"
    JAI operator: "Invert"
    Parameters:

    Name Class Default value Minimum value Maximum value
    "Source" GridCoverage2D N/A N/A N/A
    Since:
    2.2
    Author:
    Martin Desruisseaux (IRD)
    See Also:
    Operations.invert(org.geotools.api.coverage.Coverage), InvertDescriptor, Serialized Form
    • Constructor Detail

      • Invert

        public Invert()
        Constructs a default "Invert" 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.
        Overrides:
        deriveRange in class OperationJAI
        Parameters:
        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.
        Returns:
        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.

        Overrides:
        handleJAIEXTParams in class OperationJAI
        Parameters:
        parameters - ParameterBlockJAI 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.