Class RangesImpl
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate static intcellWidth(int gx, int cw, long iw) Get width of a cell (depending on whether it's an inner cell or a border cell).(package private) static List<Ranges.Range> findRanges_border(long bx, int bw, long iw, int cw) Find ranges for one dimension.(package private) static List<Ranges.Range> findRanges_constant(long bx, int bw, long iw, int cw) Find ranges for one dimension.(package private) static List<Ranges.Range> findRanges_mirror_double(long bx, int bw, long iw, int cw) Find ranges for one dimension.(package private) static List<Ranges.Range> findRanges_mirror_single(long bx, int bw, long iw, int cw) Find ranges for one dimension.
-
Field Details
-
FIND_RANGES_CONSTANT
-
FIND_RANGES_MIRROR_SINGLE
-
FIND_RANGES_MIRROR_DOUBLE
-
FIND_RANGES_BORDER
-
-
Constructor Details
-
RangesImpl
RangesImpl()
-
-
Method Details
-
findRanges_constant
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 copybw, in a particular dimension. The full size of the (non-extended) image in this dimension is given byiw, the size of a (non-truncated) cell in this dimension is given bycw.- 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
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 copybw, in a particular dimension. The full size of the (non-extended) image in this dimension is given byiw, the size of a (non-truncated) cell in this dimension is given bycw.- 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
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 copybw, in a particular dimension. The full size of the (non-extended) image in this dimension is given byiw, the size of a (non-truncated) cell in this dimension is given bycw.- 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
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 copybw, in a particular dimension. The full size of the (non-extended) image in this dimension is given byiw, the size of a (non-truncated) cell in this dimension is given bycw.- 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 cellcw- cell width (of grid)iw- image width- Returns:
- cell width
-