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.Point3d clamp​(org.anchoranalysis.spatial.point.Point3d point, Dimensions dimensions)
    Clamps a double-precision point to be within the given dimensions.
    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.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • 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 clamp
      dimensions - 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 clamp
      dimensions - the dimensions to clamp within
      Returns:
      a new Point3d with clamped coordinates