public final class MapDimensions extends Object
| Modifier and Type | Class and Description |
|---|---|
static interface |
MapDimensions.SelectIntervalDimension
Selects a particular element of the
min and size vectors of
an interval. |
| Modifier and Type | Method and Description |
|---|---|
static int[] |
createMapDimensions(int[] imarisDims,
long[] imgDims)
Tries to derive a
mapDimensions array matching the specified
Imaris and imglib2 dimension arrays. |
static int[] |
fromAxisOrder(AxisOrder axisOrder) |
static int[] |
invertMapDimensions(int[] mapDimensions)
Return the reverse mapping for the given
mapDimensions, such that
mapDimensions[inv[i]] == i for all i. |
static MapDimensions.SelectIntervalDimension |
selectIntervalDimension(int d)
Create a
MapIntervalDimension that selects the d-th
element of any min or size vectors. |
public static int[] createMapDimensions(int[] imarisDims,
long[] imgDims)
mapDimensions array matching the specified
Imaris and imglib2 dimension arrays.
mapDimensions 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 dimension
in img. For img, dimensions with size=1 may be skipped.
For example, assume we have a XYC image, that is, a multi-channel 2D
image, with imarisDims={800,600,1,3,1}. Let imgDims={800,600,3}, indicating that the imglib2 img should not
have Z and T dimensions (instead of dimensions having size 1). Then the
result is mapDimensions={0,1,-1,2,-1}.
imarisDims - dimensions of the Imaris dataset (int[5], with X,Y,Z,C,T)imgDims - dimensions of the imglib2 imageint[5] array mapDimensions, that 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 dimension in the imglib2
Img. E.g., for a XYC image mapDimensions={0,1,-1,2,-1}.public static int[] fromAxisOrder(AxisOrder axisOrder)
public static int[] invertMapDimensions(int[] mapDimensions)
mapDimensions, such that
mapDimensions[inv[i]] == i for all i.
E.g., for mapDimensions={0,1,-1,2,-1} returns
invMapDimensions={0,1,3}.
The length of the returned array is determined by the maximum
dimension index occurring in mapDimensions.
public static MapDimensions.SelectIntervalDimension selectIntervalDimension(int d)
MapIntervalDimension that selects the d-th
element of any min or size vectors. If d < 0,
then instead of selecting an element, min is always 0, and size is always 1.Copyright © 2019–2021 Imaris. All rights reserved.