Class OutlineKernelNeighborMatchValue


public class OutlineKernelNeighborMatchValue extends OutlineKernelBase
Outputs the outline of an object-mask, but only for voxels on the exterior which neighbor a binary-mask.

Specifically, voxels on the object are set only to on if they neighbor a off voxel and this neighboring voxel is on in the binary-mask. Otherwise a voxel is off.

Author:
Owen Feehan
  • Constructor Details

    • OutlineKernelNeighborMatchValue

      public OutlineKernelNeighborMatchValue(BinaryVoxels<UnsignedByteBuffer> mask)
      Creates for an object.
      Parameters:
      mask - the mask defining possible neighbors, defined on the same coordinate space as object.
  • Method Details

    • notifyBuffer

      public void notifyBuffer(LocalSlices slices, int sliceIndex)
      Description copied from class: Kernel
      Called to inform the Kernel of buffers that are currently being processed.

      Only a single z-slice is processed at a particular time.

      This should be repeatedly called each time the focus changes to a different z-slice.

      Overrides:
      notifyBuffer in class BinaryKernelMorphological
      Parameters:
      slices - slices that can be processed by the kernel, localized to a current local area of focus.
      sliceIndex - the global z-index of the slice that is currently the focus of the kernel.
    • doesNeighborQualify

      protected boolean doesNeighborQualify(boolean inside, KernelPointCursor point, Supplier<UnsignedByteBuffer> buffer, int zShift)
      Checks whether a particular neighbor voxel qualifies to make the current voxel an outline voxel.
      Specified by:
      doesNeighborQualify in class BinaryKernelMorphological
      Parameters:
      inside - true iff the neighboring-point is inside the scene.
      point - the point.
      buffer - the associated buffer.
      zShift - the buffer associated with the current point.
      Returns:
      true if the neighboring-point satisfied the conditions.