Interface Ranges

  • Functional Interface:
    This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

    @FunctionalInterface
    interface Ranges
    Find ranges for one dimension.

    Split the requested interval into ranges covering (possibly partial) cells of the input image. The requested interval is given by start coordinate bx (in the extended source image) and size of the block to copy bw, in a particular dimension. The full size of the (non-extended) image in this dimension is given by iw, the size of a (non-truncated) cell in this dimension is given by cw.

    Out-of-bounds values are handled depending on Extension strategy. Use forExtension(Extension) to pick a particular strategy.

    • Method Detail

      • findRanges

        java.util.List<Ranges.Range> findRanges​(long bx,
                                                int bw,
                                                long iw,
                                                int cw)
        Find ranges for one dimension.

        Split the requested interval into ranges covering (possibly partial) cells of the input image. The requested interval is given by start coordinate bx (in the extended source image) and size of the block to copy bw, in a particular dimension. The full size of the (non-extended) image in this dimension is given by iw, the size of a (non-truncated) cell in this dimension is given by cw.

        Out-of-bounds values are handled depending on Extension strategy. Use forExtension(Extension) to pick a particular strategy.

        Parameters:
        bx - start of block in source coordinates (in pixels)
        bw - width of block to copy (in pixels)
        iw - source image width (in pixels)
        cw - source cell width (in pixels)
      • forExtension

        static Ranges forExtension​(Extension extension)
        CONSTANT: Out-of-bounds values are set to a constant.
        Parameters:
        extension -
        Returns: