Class RangesImpl

java.lang.Object
net.imglib2.blocks.RangesImpl

class RangesImpl extends Object
  • Field Details

    • FIND_RANGES_CONSTANT

      static Ranges FIND_RANGES_CONSTANT
    • FIND_RANGES_MIRROR_SINGLE

      static Ranges FIND_RANGES_MIRROR_SINGLE
    • FIND_RANGES_MIRROR_DOUBLE

      static Ranges FIND_RANGES_MIRROR_DOUBLE
    • FIND_RANGES_BORDER

      static Ranges FIND_RANGES_BORDER
  • Constructor Details

    • RangesImpl

      RangesImpl()
  • Method Details

    • findRanges_constant

      static List<Ranges.Range> findRanges_constant(long bx, int bw, long iw, int cw)
      Find ranges for one dimension.

      Out-of-bounds values are set to a constant.

      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.

      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)
    • findRanges_border

      static List<Ranges.Range> findRanges_border(long bx, int bw, long iw, int cw)
      Find ranges for one dimension.

      Out-of-bounds values are determined by border extension (clamping to the nearest pixel in the image).

      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.

      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)
    • findRanges_mirror_double

      static List<Ranges.Range> findRanges_mirror_double(long bx, int bw, long iw, int cw)
      Find ranges for one dimension.

      Out-of-bounds values are determined by mirroring with double boundary, i.e., border pixels are repeated.

      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.

      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)
    • findRanges_mirror_single

      static List<Ranges.Range> findRanges_mirror_single(long bx, int bw, long iw, int cw)
      Find ranges for one dimension.

      Out-of-bounds values are determined by mirroring with single boundary, i.e., border pixels are not repeated.

      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.

      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)
    • cellWidth

      private static int cellWidth(int gx, int cw, long iw)
      Get width of a cell (depending on whether it's an inner cell or a border cell).
      Parameters:
      gx - grid coordinate of the cell
      cw - cell width (of grid)
      iw - image width
      Returns:
      cell width