Class Cell<A>
java.lang.Object
net.imglib2.img.cell.Cell<A>
- All Implemented Interfaces:
Serializable, Dimensions, EuclideanSpace, Interval, RealInterval
A cell of an
AbstractCellImg.- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final Aprotected final int[]protected final long[]protected final intprivate final intprivate static final longprotected final int[] -
Constructor Summary
ConstructorsConstructorDescriptionCreate a newCell.Cell(CellGrid.CellDimensionsAndSteps dims, long[] min, A data) Create a newCell. -
Method Summary
Modifier and TypeMethodDescriptionlongdimension(int d) Get the number of pixels in a given dimension d.voiddimensions(int[] dim) Write the number of pixels in each dimension into int[].getData()Get the basic type array that stores this cell's pixels.intglobalPositionToIndex(long[] position) Compute the index in the underlying flat array of this cell which corresponds to the specified globalposition.longindexToGlobalPosition(int index, int d) voidindexToGlobalPosition(int index, long[] position) longmax(int d) Get the maximum in dimension d.longmin(int d) Get the minimum in dimension d.intGets the space's number of dimensions.longsize()Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface Dimensions
dimensions, dimensions, dimensionsAsLongArray, dimensionsAsPointMethods inherited from interface Interval
max, max, maxAsLongArray, maxAsPoint, min, min, minAsLongArray, minAsPoint, realMax, realMinMethods inherited from interface RealInterval
maxAsDoubleArray, maxAsRealPoint, minAsDoubleArray, minAsRealPoint, realMax, realMax, realMin, realMin
-
Field Details
-
serialVersionUID
private static final long serialVersionUID- See Also:
-
n
protected final int n -
dimensions
protected final int[] dimensions -
steps
protected final int[] steps -
min
protected final long[] min -
numPixels
private final int numPixels -
data
-
-
Constructor Details
-
Cell
Create a newCell.The arguments are not copied. Therefore,
dimensionsandminarrays may be modified and re-used to create otherCells. -
Cell
Create a newCell.Note that the arguments are not copied. So for example, the
minarray should not be modified and re-used to create otherCells.- Parameters:
dims- dimensions, steps, and numPixels of the cellmin- min coordinate of the celldata- pixel storage
-
-
Method Details
-
getData
Get the basic type array that stores this cell's pixels.- Returns:
- underlying basic type array.
-
size
public long size() -
indexToGlobalPosition
public long indexToGlobalPosition(int index, int d) -
indexToGlobalPosition
public void indexToGlobalPosition(int index, long[] position) -
globalPositionToIndex
public int globalPositionToIndex(long[] position) Compute the index in the underlying flat array of this cell which corresponds to the specified globalposition.- Parameters:
position- a global position- Returns:
- corresponding index
-
numDimensions
public int numDimensions()Description copied from interface:EuclideanSpaceGets the space's number of dimensions.- Specified by:
numDimensionsin interfaceEuclideanSpace
-
min
-
max
-
dimension
public long dimension(int d) Get the number of pixels in a given dimension d.- Specified by:
dimensionin interfaceDimensions- Specified by:
dimensionin interfaceInterval- Parameters:
d-
-
dimensions
public void dimensions(int[] dim) Write the number of pixels in each dimension into int[].- Parameters:
dim-
-