public final class ElementUtil extends Object
Modifier and Type | Method and Description |
---|---|
static <T extends AnnotatedSpace<CalibratedAxis>> |
calibratedSpatialElementSize(T space,
UnitService unitService)
Returns the calibrated size of a single spatial element in the given space,
e.g.
|
static <T extends RealType<T> & NativeType<T>> |
isBinary(IterableInterval<T> interval)
Checks whether the interval contains only two distinct values.
|
public static <T extends AnnotatedSpace<CalibratedAxis>> double calibratedSpatialElementSize(T space, UnitService unitService)
Spatial axes do not have to have the same unit in calibration, but you must be able to convert between them.
T
- type of the space.space
- an N-dimensional space.unitService
- needed to convert between units of different
calibrations.public static <T extends RealType<T> & NativeType<T>> boolean isBinary(IterableInterval<T> interval)
T
- type of the elements in the interval.interval
- an iterable interval.Copyright © 2018–2022 BoneJ. All rights reserved.