Object
DilationContext

public class DilationContext extends Object
Additional parameters for influencing a morphologicla dilation opperation.
Author:
Owen Feehan
  • Constructor Details

    • DilationContext

      public DilationContext(OutsideKernelPolicy outsideKernelPolicy, boolean useZ, boolean bigNeighborhood, Optional<Predicate<Point3i>> precondition)
      Create without a post-condition.
      Parameters:
      outsideKernelPolicy - how to handle voxels whose neighbors are outside the scene.
      useZ - if true, the dilation also occurs in the Z-dimension, otherwise in the XY-dimensions only.
      bigNeighborhood - if true, a big neighborhood is used 2D-plane (8-connected instead of 4-connected), but not in Z-direction (remains always 2-connected).
      precondition - if defined, a condition which must be satisfied on a voxel, before any voxel can be dilated.
    • DilationContext

      public DilationContext(OutsideKernelPolicy outsideKernelPolicy, boolean useZ, boolean bigNeighborhood, Optional<Predicate<Point3i>> precondition, Optional<AcceptIterationPredicate> postcondition)
      Create with a post-condition.
      Parameters:
      outsideKernelPolicy - how to handle voxels whose neighbors are outside the scene.
      useZ - if true, the dilation also occurs in the Z-dimension, otherwise in the XY-dimensions only.
      bigNeighborhood - if true, a big neighborhood is used 2D-plane (8-connected instead of 4-connected), but not in Z-direction (remains always 2-connected).
      precondition - if defined, a condition which must be satisfied on a voxel, before any voxel can be dilated.
      postcondition - if defined, a condition which must be satisfied after an iteration occurs, otherwise no more iterations occur.
  • Method Details

    • createKernel

      public BinaryKernel createKernel()
      Creates a kernel for performing the dilation.
      Returns:
      the kernel that performs the dilation.
    • getKernelApplication

      public KernelApplicationParameters getKernelApplication()
      How the kernel is applied to the scene.
    • getPostcondition

      public Optional<AcceptIterationPredicate> getPostcondition()
      If defined, a condition which must be satisfied after an iteration occurs, otherwise no more iterations occur.