Class CountKernel

Object
org.anchoranalysis.image.voxel.kernel.Kernel
org.anchoranalysis.image.voxel.kernel.count.CountKernel
Direct Known Subclasses:
CountKernelNeighborhood, CountKernelNeighborhoodMask

public abstract class CountKernel
extends Kernel
Base class for kernels that return a count (positive integer) for every voxel.
Author:
Owen Feehan
  • Constructor Details

    • CountKernel

      protected CountKernel()
      Creates with a kernel-size of three.
  • 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.

      Specified by:
      notifyBuffer in class Kernel
      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.
    • calculateAt

      public int calculateAt​(KernelPointCursor point)
      Calculates the count at a particular point.
      Parameters:
      point - the point.
      Returns:
      the count.
    • doesNeighborVoxelQualify

      protected abstract boolean doesNeighborVoxelQualify​(Point3i point)
      Whether a particular neighboring voxel is accepted or not.
      Parameters:
      point - the neighboring point which is queried if it qualifies or not.
      Returns:
      true iff the point qualifies.