Class RangesImpl
- java.lang.Object
-
- net.imglib2.blocks.RangesImpl
-
class RangesImpl extends java.lang.Object
-
-
Field Summary
Fields Modifier and Type Field Description (package private) static RangesFIND_RANGES_BORDER(package private) static RangesFIND_RANGES_CONSTANT(package private) static RangesFIND_RANGES_MIRROR_DOUBLE(package private) static RangesFIND_RANGES_MIRROR_SINGLE
-
Constructor Summary
Constructors Constructor Description RangesImpl()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description private 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 java.util.List<Ranges.Range>findRanges_border(long bx, int bw, long iw, int cw)Find ranges for one dimension.(package private) static java.util.List<Ranges.Range>findRanges_constant(long bx, int bw, long iw, int cw)Find ranges for one dimension.(package private) static java.util.List<Ranges.Range>findRanges_mirror_double(long bx, int bw, long iw, int cw)Find ranges for one dimension.(package private) static java.util.List<Ranges.Range>findRanges_mirror_single(long bx, int bw, long iw, int cw)Find ranges for one dimension.
-
-
-
Method Detail
-
findRanges_constant
static java.util.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 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
static java.util.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 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
static java.util.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 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
static java.util.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 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
-
-