Direct Known Subclasses:
NumberNeighboringVoxels, NumberVoxelsAtBorder

public abstract class OutlineKernelBase extends FeatureSingleObject
Base class for features that apply a kernel to the outline of an object.
  • Constructor Details

    • OutlineKernelBase

      public OutlineKernelBase()
  • Method Details

    • calculate

      Description copied from class: Feature
      Calculates a value for some input.
      Specified by:
      calculate in class Feature<FeatureInputSingleObject>
      Parameters:
      input - the input to the calculation.
      Returns:
      the result of the calculation.
      Throws:
      FeatureCalculationException - if the calculation cannot successfully complete.
    • calculateWithParameters

      protected abstract double calculateWithParameters(ObjectMask object, KernelApplicationParameters parameters, CheckedSupplier<EnergyStack,FeatureCalculationException> energyStack) throws FeatureCalculationException
      Calculates the feature value using the specified parameters.
      Parameters:
      object - the ObjectMask to calculate the feature on
      parameters - the KernelApplicationParameters for applying the kernel
      energyStack - a supplier for the EnergyStack
      Returns:
      the calculated feature value
      Throws:
      FeatureCalculationException - if the calculation fails
    • isOutsideAtThreshold

      public boolean isOutsideAtThreshold()
      If true, considers voxels outside the object at the threshold as part of the object.
    • setOutsideAtThreshold

      public void setOutsideAtThreshold(boolean outsideAtThreshold)
      If true, considers voxels outside the object at the threshold as part of the object.
    • isIgnoreAtThreshold

      public boolean isIgnoreAtThreshold()
      If true, ignores voxels at the threshold when applying the kernel.
    • setIgnoreAtThreshold

      public void setIgnoreAtThreshold(boolean ignoreAtThreshold)
      If true, ignores voxels at the threshold when applying the kernel.
    • isDo3D

      public boolean isDo3D()
      If true, applies the kernel in 3D; otherwise, applies it in 2D.
    • setDo3D

      public void setDo3D(boolean do3D)
      If true, applies the kernel in 3D; otherwise, applies it in 2D.