public final class ResultUtils extends Object
Modifier and Type | Method and Description |
---|---|
static <S extends AnnotatedSpace<A>,A extends TypedAxis> |
getExponent(S space)
Returns the exponent character of the elements in this space, e.g.
|
static <S extends AnnotatedSpace<A>,A extends TypedAxis> |
getSizeDescription(S space)
Returns a verbal description of the size of the elements in the given
space, e.g.
|
static String |
getUnitHeader(ij.ImagePlus imagePlus)
Gets the unit of the image calibration, which can be displayed to the user.
|
static <S extends AnnotatedSpace<CalibratedAxis>> |
getUnitHeader(S space,
UnitService unitService,
String exponent)
Returns the common unit string, e.g.
|
static long |
toConventionalIndex(AxisType type,
long index)
If needed, converts the given index to the ImageJ1 convention where Z,
Channel and Time axes start from 1.
|
public static <S extends AnnotatedSpace<A>,A extends TypedAxis> char getExponent(S space)
S
- type of the space.A
- type of the axes.space
- an N-dimensional space.public static <S extends AnnotatedSpace<A>,A extends TypedAxis> String getSizeDescription(S space)
S
- type of the space.A
- type of the axes.space
- an N-dimensional space.public static <S extends AnnotatedSpace<CalibratedAxis>> String getUnitHeader(S space, UnitService unitService, String exponent)
The common unit is the unit of the first spatial axis if it can be converted to the units of the other axes.
S
- type of the space.space
- an N-dimensional space.unitService
- an UnitService
to convert axis calibrations.exponent
- an exponent to be added to the unit, e.g. '³'.public static String getUnitHeader(ij.ImagePlus imagePlus)
imagePlus
- a ImageJ1 style ImagePlus
.public static long toConventionalIndex(AxisType type, long index)
type
- type of the axis's dimension.index
- the index in the axis.Copyright © 2018–2022 BoneJ. All rights reserved.