Package org.anchoranalysis.mpp.mark
Class PointClamper
Object
org.anchoranalysis.mpp.mark.PointClamper
public class PointClamper extends Object
Utility class to ensure a point has values contained inside image-dimensions.
-
Method Summary
Modifier and Type Method Description static org.anchoranalysis.spatial.point.Point3dclamp(org.anchoranalysis.spatial.point.Point3d point, Dimensions dimensions)Clamps a double-precision point to be within the given dimensions.static org.anchoranalysis.spatial.point.Point3iclamp(org.anchoranalysis.spatial.point.Point3i point, Dimensions dimensions)Clamps an integer point to be within the given dimensions.
-
Method Details
-
clamp
public static org.anchoranalysis.spatial.point.Point3i clamp(org.anchoranalysis.spatial.point.Point3i point, Dimensions dimensions)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
public static org.anchoranalysis.spatial.point.Point3d clamp(org.anchoranalysis.spatial.point.Point3d point, Dimensions dimensions)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
-