public final class DatasetDimensions extends Object
ImarisDataset
.
Stores the 5D XYZCT dimensions
of the
underlying Imaris dataset, as well as the mapping
from Imaris to ImgLib2 dimensions.
In Imaris, datasets are always 5D: for example, a 2D dataset (without channel
or time) is represented as 5D with size=1
along Z, C, T axes. In
ImgLib2, there is a distinction between a 2D image and a 5D image with size=1
along the 3rd, 4th, and 5th dimension. Therefore, there are several
ways to represent such an Imaris dataset in ImgLib2. Which way is chosen is
specified by the mapping
from Imaris to ImgLib2
dimensions, as well as (redundantly) the #getAxisOrder axis order
(of
the ImgLib2 representation).
Constructor and Description |
---|
DatasetDimensions(Imaris.IDataSetPrx dataset,
ImarisAxesOptions.Axis... includeAxes)
Create
DatasetDimensions from the given Imaris IDataSetPrx . |
DatasetDimensions(int sx,
int sy,
int sz,
int sc,
int st)
Create
DatasetDimensions . |
Modifier and Type | Method and Description |
---|---|
int |
dimC()
Get the index of the channel dimension in the ImgLib2 representation.
|
int |
dimT()
Get the index of the time dimension in the ImgLib2 representation.
|
int |
dimX()
Get the index of the X dimension in the ImgLib2 representation.
|
int |
dimY()
Get the index of the Y dimension in the ImgLib2 representation.
|
int |
dimZ()
Get the index of the Z dimension in the ImgLib2 representation.
|
AxisOrder |
getAxisOrder()
Returns the
AxisOrder of the ImgLib2 representation. |
int[] |
getImarisDimensions()
Returns the 5D dimensions of the dataset on the imaris side.
|
int[] |
getMapDimensions()
Get the mapping between dimension indices in the Imaris and in the
ImgLib2 representation.
|
boolean |
hasC()
Returns
true if the ImgLib2 representation has a channel dimension. |
boolean |
hasT()
Returns
true if the ImgLib2 representation has a time dimension. |
boolean |
hasZ()
Returns
true if the ImgLib2 representation has a Z dimension. |
int |
sizeC()
Returns the number of channels.
|
int |
sizeT()
Returns the number of timepoints.
|
int |
sizeX()
Returns the size along X.
|
int |
sizeY()
Returns the size along Y.
|
int |
sizeZ()
Returns the size along Z.
|
String |
toString() |
public DatasetDimensions(int sx, int sy, int sz, int sc, int st)
DatasetDimensions
.
Sizes s≤0
indicate missing dimensions. For example, new
DatasetDimension(new UnsignedByteType(), 300, 200, 0, 0, 0)
represents a
2D ImgLib2 image with axes [X,Y]
. The size along missing
dimensions (Z, C, T in this example) is set to s=1
on the Imaris
side.
sx
- size in X dimensionsy
- size in Y dimensionsz
- size in Z dimensionsc
- size in C (channel) dimensionst
- size in T (time) dimensionpublic DatasetDimensions(Imaris.IDataSetPrx dataset, ImarisAxesOptions.Axis... includeAxes) throws Imaris.Error
DatasetDimensions
from the given Imaris IDataSetPrx
.
The optional includeAxes
arguments specify which axes must be
included (at least) in the ImgLib2 representation.
In Imaris, datasets are always 5D: for example, a 2D dataset (without channel
or time) is represented as 5D with size=1
along Z, C, T axes. In
ImgLib2, there is a distinction between a 2D image and a 5D image with size=1
along the 3rd, 4th, and 5th dimension. Therefore, there are several
ways to represent such an Imaris dataset in ImgLib2. Which way is chosen is
specified by the mapping
from Imaris to ImgLib2
dimensions, as well as (redundantly) the #getAxisOrder axis order
(of
the ImgLib2 representation).
By default, axes Z, C, and T are not represented in ImgLib2 if the
dataset size along those axes is s=1
. By specifying these axes as
includeAxes
arguments, this can be overridden. For example, an
Imaris dataset with size {100, 100, 1, 1, 1}
would be represented
as a 2D ImgLib2 image with size {100, 100}
. Specifying includeAxes = Z, T
, would result in a 4D ImgLib2 image with size {100,100,1,1}
.
Imaris.Error
public int[] getMapDimensions()
The returned int[5]
array maps Imaris dimension indices to
imglib2 dimension indices. If i is dimension index from Imaris (0..4
means X,Y,Z,C,T) then mapDimensions[i] is the corresponding imglib2
dimension, e.g., in imagePyramid.
For imglib2 dimensions, Imaris dimensions with size=1 maybe skipped.
E.g., for a XYC image mapDimensions = {0,1,-1,2,-1}
.
public int[] getImarisDimensions()
public AxisOrder getAxisOrder()
AxisOrder
of the ImgLib2 representation. The returned
value will be one of XY
, XYZ
, XYC
, XYT
,
XYZC
, XYZT
, XYCT
, XYZCT
.public int dimX()
0
.)public int sizeX()
public int dimY()
1
.)public int sizeY()
public boolean hasZ()
true
if the ImgLib2 representation has a Z dimension.public int dimZ()
public int sizeZ()
1
.public boolean hasC()
true
if the ImgLib2 representation has a channel dimension.public int dimC()
public int sizeC()
1
.public boolean hasT()
true
if the ImgLib2 representation has a time dimension.public int dimT()
public int sizeT()
1
.Copyright © 2019–2021 Imaris. All rights reserved.