Interface Coords
This is typically used to represent the time point, stage position, z slice, and channel indices of images.
The Coords object is a mapping from axes (represented by strings) to
positive integer indices. Because an arbitrary number of axes may be included
in the Coords, the index zero is meaningless and will be omitted. Therefore,
the axis index for any index not included in the Coords will be zero. The
Coords of an image that is zero for all axes is an empty Coords.
The equals operator can be relied upon to establish whether two different Coords contain the same axes and the same indices to those axes.
Although methods are included to support any arbitrary axes, such usage is not yet fully supported. If you do use custom axes, give them names that include upper case letters so that they do not clash with standard axes added in the future.
Coords objects are immutable.
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic interfaceThe real Builder for Coords.static interfaceNot sure why there is a Builder and CoordsBuilder. -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringAxis label for the channel axis (short form).static final StringAxis label for the channel axis.static final StringAxis label for the stage position axis (short form).static final StringAxis label for the stage position axis.static final StringAxis label for the time point (frame) axis (short form).static final StringDeprecated.Use discouraged because it reads like a physical time rather than the time point index that it is.static final StringAxis label for the time point (frame) axis.static final StringAxis label for the Z slice axis (short form).static final StringAxis label for the Z slice axis. -
Method Summary
Modifier and TypeMethodDescriptioncopy()Deprecated.UsecopyBuilderinsteadProvides a Builder pre-loaded with a copy of this Coords.copyRemovingAxes(String... axes) Removes the axes provided as varargs from this Coord.copyRetainingAxes(String... axes) Name of this function is very unclear.getAxes()Return all axes that thisCoordshas an index for.intgetC()Shorthand forgetChannel.intGet the channel index.intGet the index for the given axis.intgetP()Shorthand forgetStagePosition.intGet the stage position index.intgetT()Shorthand forgetTimePoint.intgetTime()Deprecated.Due to looking like the physical time rather than an index.intGet the time point (frame) index.intgetZ()Shorthand forgetZSlice.intGet the Z slice index.booleanReturns whether this coords has the given axis.booleanhasC()booleanbooleanhasP()booleanbooleanhasT()booleanbooleanhasZ()booleanbooleanDeprecated.Use equality (after removing specific axes) instead
-
Field Details
-
TIME_POINT
-
TIME
Deprecated.Use discouraged because it reads like a physical time rather than the time point index that it is.Same asTIME_POINTorT.- See Also:
-
T
Axis label for the time point (frame) axis (short form). Same asTIME_POINT.- See Also:
-
STAGE_POSITION
-
P
Axis label for the stage position axis (short form). Same asSTAGE_POSTITION.- See Also:
-
Z_SLICE
-
Z
-
CHANNEL
-
C
-
-
Method Details
-
getIndex
Get the index for the given axis.- Parameters:
axis- coordinate axis such asCoords.CHANNEL- Returns:
- index along
axis, or0ifaxisdoes not exist
-
getChannel
int getChannel()Get the channel index.Equivalent to
getIndex(Coords.CHANNEL).- Returns:
- channel index, or
0if thisCoordsdoesn't contain a channel index.
-
getC
int getC()Shorthand forgetChannel.- Returns:
- channel index, or
0if thisCoordsdoesn't contain a channel index.
-
getTimePoint
int getTimePoint()Get the time point (frame) index.Equivalent to
getIndex(Coords.TIME_POINT).- Returns:
- time point index, or
0if thisCoordsdoesn't contain a time point index.
-
getTime
Deprecated.Due to looking like the physical time rather than an index. UsegetTmePointSame asgetTimePoint.- Returns:
- time index (0-based)
-
getT
int getT()Shorthand forgetTimePoint.- Returns:
- time point index, or
0if thisCoordsdoesn't contain a time point index.
-
getZSlice
int getZSlice()Get the Z slice index.Equivalent to
getIndex(Coords.Z_SLICE).- Returns:
- Z slice index, or
0if thisCoordsdoesn't contain a Z slice index.
-
getZ
int getZ()Shorthand forgetZSlice.- Returns:
- Z slice index, or
0if thisCoordsdoesn't contain a Z slice index.
-
getStagePosition
int getStagePosition()Get the stage position index.Equivalent to
getIndex(Coords.STAGE_POSITION).- Returns:
- stage position index, or
0if thisCoordsdoesn't contain a stage position index.
-
getP
int getP()Shorthand forgetStagePosition.- Returns:
- stage position index, or
0if thisCoordsdoesn't contain a stage position index.
-
getAxes
-
hasAxis
Returns whether this coords has the given axis.- Parameters:
axis- the axis to test for presence- Returns:
- true if this coords includes
axis
-
hasTimePointAxis
boolean hasTimePointAxis() -
hasT
boolean hasT() -
hasStagePositionAxis
boolean hasStagePositionAxis() -
hasP
boolean hasP() -
hasZSliceAxis
boolean hasZSliceAxis() -
hasZ
boolean hasZ() -
hasChannelAxis
boolean hasChannelAxis() -
hasC
boolean hasC() -
matches
Deprecated.Use equality (after removing specific axes) insteadDeprecated.- Parameters:
alt- the instance to compare with- Returns:
- whether this instance is a superspace coords of
other
-
copyBuilder
Coords.Builder copyBuilder()Provides a Builder pre-loaded with a copy of this Coords.- Returns:
- copyBuilder
-
copy
-
copyRemovingAxes
-
copyRetainingAxes
Name of this function is very unclear. It seems that its functionality is to provide a copy of the given Coords, but only for the axes provided in the input strings. A more useful name may be: copyProvidedAxes, or copyAxes- Parameters:
axes- Names of axes to be represented in the output- Returns:
- Copy of this Coords, but only with the subset of axes provided in the axes param
-