Interface Resampling

  • All Known Implementing Classes:
    BilinearInterpolationResampling

    public interface Resampling
    An interface used to implement different resampling strategies.
    • Field Detail

      • NEAREST_NEIGHBOUR

        static final Resampling NEAREST_NEIGHBOUR
        The nearest neighbour resampling method.
      • BILINEAR_INTERPOLATION

        static final Resampling BILINEAR_INTERPOLATION
        The bilinear interpolation resampling method.
      • CUBIC_CONVOLUTION

        static final Resampling CUBIC_CONVOLUTION
        The cubic convolution resampling method.
      • BISINC_5_POINT_INTERPOLATION

        static final Resampling BISINC_5_POINT_INTERPOLATION
        The bisinc interpolation resampling method.
      • BISINC_11_POINT_INTERPOLATION

        static final Resampling BISINC_11_POINT_INTERPOLATION
      • BISINC_21_POINT_INTERPOLATION

        static final Resampling BISINC_21_POINT_INTERPOLATION
      • BICUBIC_INTERPOLATION

        static final Resampling BICUBIC_INTERPOLATION
        The bicubic spline interpolation resampling method.
    • Method Detail

      • getName

        String getName()
        Gets a unique identifier for this resampling method, e.g. "BILINEAR_INTERPOLATION".
        Returns:
        a unique name
      • createIndex

        Resampling.Index createIndex()
        Factory method which creates an appropriate index for raster access.
        Returns:
        an appropriate index, never null
      • computeIndex

        void computeIndex​(double x,
                          double y,
                          int width,
                          int height,
                          Resampling.Index index)
        Computes the index's properties for the given pixel coordinate.
        Parameters:
        x - the raster's x coordinate
        y - the raster's y coordinate
        width - the raster's width
        height - the raster's height
        index - the index object to which the results are to be assigned
      • computeCornerBasedIndex

        default void computeCornerBasedIndex​(double x,
                                             double y,
                                             int width,
                                             int height,
                                             Resampling.Index index)
        Computes the index's properties for the given non-pixel coordinate without pixel center intensity assumption.

        The default implementation computes the resampling index for given coordinate without pixel center intensity assumption. It adds 0.5 to coordinates to counter the consideration of pixel center in base function.

        Parameters:
        x - the raster's x coordinate
        y - the raster's y coordinate
        width - the raster's width
        height - the raster's height
        index - the index object to which the results are to be assigned
      • getKernelSize

        default int getKernelSize()