Object
Steepest

public final class Steepest extends Object
Calculates the steepest descent direction for voxels in a watershed segmentation.
  • Constructor Details

    • Steepest

      public Steepest(SlidingBuffer<?> buffer, WatershedEncoding encoder, boolean do3D, boolean bigNeighborhood, Optional<ObjectMask> objectMask)
      Creates a Steepest instance for a specific buffer.
      Parameters:
      buffer - the SlidingBuffer to process
      encoder - the WatershedEncoding to use for encoding directions
      do3D - whether to perform 3D processing
      bigNeighborhood - if true, use 8-Connectivity instead of 4 in 2D, and 26-connectivity instead of 6 in 3D, as per NeighborhoodFactory
      objectMask - an optional ObjectMask to restrict processing
  • Method Details

    • steepestDescent

      public int steepestDescent(Point3i point, int val, int indxBuffer)
      Calculates the steepest descent direction for a given point.
      Parameters:
      point - the Point3i to calculate the steepest descent for
      val - the value at the given point
      indxBuffer - the buffer index for the given point
      Returns:
      the encoded direction of steepest descent