Class ExtractMidpoint
Object
org.anchoranalysis.image.io.object.ExtractMidpoint
public class ExtractMidpoint extends Object
Extracts a
Point3i representing the mid-point of an ObjectWithProperties.
The midpoint is taken, in order of preference:
- From a property with key "midpointInt", if it exists.
- From the center-of-gravity of the
ObjectMask.
- Author:
- Owen Feehan
-
Method Summary
Modifier and Type Method Description static org.anchoranalysis.spatial.point.Point3imidpoint(ObjectWithProperties object, boolean suppressZ)Calculates the midpoint ofobject.
-
Method Details
-
midpoint
public static org.anchoranalysis.spatial.point.Point3i midpoint(ObjectWithProperties object, boolean suppressZ)Calculates the midpoint ofobject.- Parameters:
object- the object to calculate a midpoint for, possibly containing a property with key "midpointInt".suppressZ- when true, the z-dimension is ignored, and the midpoint will always havez==0. when false, it is included in the calculation.- Returns:
- the midpoint.
-