Package org.anchoranalysis.mpp.mark
Class PointClamper
Object
PointClamper
Utility class to ensure a point has values contained inside image-dimensions.
-
Method Summary
Modifier and TypeMethodDescriptionstatic Point3d
clamp
(Point3d point, Dimensions dimensions) Clamps a double-precision point to be within the given dimensions.static Point3i
clamp
(Point3i point, Dimensions dimensions) Clamps an integer point to be within the given dimensions.
-
Method Details
-
clamp
Clamps an integer point to be within the given dimensions.- Parameters:
point
- the point to clampdimensions
- the dimensions to clamp within- Returns:
- a new Point3i with clamped coordinates
-
clamp
Clamps a double-precision point to be within the given dimensions.- Parameters:
point
- the point to clampdimensions
- the dimensions to clamp within- Returns:
- a new Point3d with clamped coordinates
-