| Modifier and Type | Class and Description |
|---|---|
class |
Grid.CellIntervals |
| Constructor and Description |
|---|
Grid(Grid grid) |
Grid(long[] dimensions,
long[] cellDimensions) |
Grid(long[] dimensions,
long[] cellDimensions,
long[] offset) |
| Modifier and Type | Method and Description |
|---|---|
long |
cellDimension(int d)
Get the number of pixels in a standard cell in dimension
d. |
void |
cellDimensions(long[] dimensions)
Write the number of pixels in a standard cell in each dimension into the
provided
dimensions array. |
Grid.CellIntervals |
cellIntervals() |
boolean |
equals(Object obj) |
long |
getCellDimension(int d,
long cellGridPosition)
From the position of a cell in the grid, compute the size of the cell in
dimension
d. |
long[] |
getCellDimensions()
Get the number of pixels in a standard cell in each dimension as a new long[].
|
void |
getCellDimensions(long[] cellGridPosition,
long[] cellMin,
long[] cellDims)
From the position of a cell in the grid, compute the image position of
the first pixel of the cell (the offset of the cell in image coordinates)
and the dimensions of the cell.
|
void |
getCellDimensions(long index,
long[] cellMin,
long[] cellDims)
From the index of a cell in the grid, compute the image position of the
first pixel of the cell (the offset of the cell in image coordinates) and
the dimensions of the cell.
|
void |
getCellGridPositionFlat(long index,
long[] cellGridPosition)
From the flattened index of a cell in the grid, compute the position of a
cell in the grid.
|
void |
getCellInterval(long[] cellGridPosition,
long[] cellMin,
long[] cellMax) |
long |
getCellMin(int d,
long cellGridPosition)
From the position of a cell in the grid, compute the image position in
dimension
d of the first pixel of the cell (the offset of the
cell in image coordinates). |
void |
getCellPosition(long[] position,
long[] cellPos)
Get the grid position of the cell containing the element at
position. |
void |
getCellPosition(long[] position,
Positionable cellPos)
Get the grid position of the cell containing the element at
position. |
long[] |
getGridDimensions()
Get the number of cells in each dimension as a new long[].
|
long[] |
getImgDimensions()
Get the number of pixels in each dimension as a new long[].
|
long |
gridDimension(int d)
Get the number of cells in dimension
d. |
void |
gridDimensions(long[] dimensions)
Write the number of cells in each dimension into the provided
dimensions array. |
int |
hashCode() |
long |
imgDimension(int d)
Get the number of pixels in dimension
d. |
void |
imgDimensions(long[] dimensions)
Write the number of pixels in each dimension into the provided
dimensions array. |
int |
numDimensions() |
String |
toString() |
public Grid(long[] dimensions,
long[] cellDimensions)
dimensions - the dimensions of the image (in pixels, not in cells).cellDimensions - the dimensions of a standard cell (in pixels). Cells on the max border
of the image may be cut off and have different dimensions.public Grid(long[] dimensions,
long[] cellDimensions,
long[] offset)
dimensions - the dimensions of the image (in pixels, not in cells).cellDimensions - the dimensions of a standard cell (in pixels). Cells on the borders
of the image may be cut off and have different dimensions.offset - offset of the grid on the min border. Cell on the min border of the
image will be cut off according to offset. For example, if cellDimensions={10,10} and offset={5,0} then the first cell
will have dimensions {5,10} (assuming that dimensions
is larger than {10,10}).public Grid(Grid grid)
public int numDimensions()
public long[] getGridDimensions()
public void gridDimensions(long[] dimensions)
dimensions array.public long gridDimension(int d)
d.public long[] getImgDimensions()
public void imgDimensions(long[] dimensions)
dimensions array. Note, that this is the number of pixels in all cells
combined, not the number of cells!public long imgDimension(int d)
d. Note, that this is the number
of pixels in all cells combined, not the number of cells!public long[] getCellDimensions()
public void cellDimensions(long[] dimensions)
dimensions array. Cells on the max borders of the image may be
cut off and have different dimensions.public long cellDimension(int d)
d. Cells on the
borders of the image may be cut off and have different dimensions.public void getCellDimensions(long index,
long[] cellMin,
long[] cellDims)
cellDimensions unless the cell is at the border of the image in
which case it might be truncated.
Note, that this method assumes that the cell grid has flat iteration
order. It this is not the case, use
getCellDimensions(long[], long[], long[]).
index - flattened grid coordinates of the cell.cellMin - offset of the cell in image coordinates are written here.cellDims - dimensions of the cell are written here.public void getCellDimensions(long[] cellGridPosition,
long[] cellMin,
long[] cellDims)
cellDimensions unless the cell is at the border of the image in
which case it might be truncated.cellGridPosition - grid coordinates of the cell.cellMin - offset of the cell in image coordinates are written here.cellDims - dimensions of the cell are written here.public void getCellInterval(long[] cellGridPosition,
long[] cellMin,
long[] cellMax)
public long getCellDimension(int d,
long cellGridPosition)
d. The size will be the standard
cellDimensions unless the cell is at the border of the image in
which case it might be truncated.d - dimension indexcellGridPosition - grid coordinates of the cell in dimension d.d.public long getCellMin(int d,
long cellGridPosition)
d of the first pixel of the cell (the offset of the
cell in image coordinates).d - dimension indexcellGridPosition - grid coordinates of the cell in dimension d.d (in image coordinates).public void getCellGridPositionFlat(long index,
long[] cellGridPosition)
index - flattened grid coordinates of the cell.cellGridPosition - grid coordinates of the cell are written here.public void getCellPosition(long[] position,
long[] cellPos)
position.position - position of an element in the image.cellPos - is set to the grid position of the cell containing the element.public void getCellPosition(long[] position,
Positionable cellPos)
position.position - position of an element in the image.cellPos - is set to the grid position of the cell containing the element.public Grid.CellIntervals cellIntervals()
Copyright © 2009–2025 ImgLib2. All rights reserved.