Package net.imglib2.img.cell
Class Cell<A>
- java.lang.Object
-
- net.imglib2.img.cell.Cell<A>
-
- All Implemented Interfaces:
java.io.Serializable
public class Cell<A> extends java.lang.Object implements java.io.Serializable
A cell of anAbstractCellImg
.- Author:
- Tobias Pietzsch
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected int[]
dimensions
protected long[]
max
protected long[]
min
protected int
n
protected int[]
steps
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
dimension(int d)
Get the number of pixels in a given dimension d.void
dimensions(int[] dim)
Write the number of pixels in each dimension into long[].A
getData()
Get the basic type array that stores this cells pixels.int
globalPositionToIndex(long[] position)
Compute the index in the underlying flat array of this cell which corresponds to the specified globalposition
.long
indexToGlobalPosition(int index, int d)
void
indexToGlobalPosition(int index, long[] position)
long
min(int d)
void
min(long[] minimum)
Write the minimum of each dimension into long[].long
size()
-
-
-
Constructor Detail
-
Cell
public Cell(int[] dimensions, long[] min, A data)
-
-
Method Detail
-
getData
public A getData()
Get the basic type array that stores this cells 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
-
min
public long min(int d)
- Parameters:
d
- dimension- Returns:
- minimum
-
min
public void min(long[] minimum)
Write the minimum of each dimension into long[].- Parameters:
minimum
-
-
dimension
public int dimension(int d)
Get the number of pixels in a given dimension d.- Parameters:
d
-
-
dimensions
public void dimensions(int[] dim)
Write the number of pixels in each dimension into long[].- Parameters:
dim
-
-
-