Class OutlineKernelBase

Object
AnchorBean<Feature<FeatureInputSingleObject>>
InitializableBean<Feature<FeatureInputSingleObject>, FeatureInitialization>
Feature<FeatureInputSingleObject>
FeatureSingleObject
OutlineKernelBase
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 Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    protected double
    calculate(FeatureCalculationInput<FeatureInputSingleObject> input)
     
    protected abstract double
    calculateWithParameters(ObjectMask object, KernelApplicationParameters parameters, CheckedSupplier<EnergyStack, FeatureCalculationException> energyStack)
    Calculates the feature value using the specified parameters.
    boolean
    If true, applies the kernel in 3D; otherwise, applies it in 2D.
    boolean
    If true, ignores voxels at the threshold when applying the kernel.
    boolean
    If true, considers voxels outside the object at the threshold as part of the object.
    void
    setDo3D(boolean do3D)
    If true, applies the kernel in 3D; otherwise, applies it in 2D.
    void
    setIgnoreAtThreshold(boolean ignoreAtThreshold)
    If true, ignores voxels at the threshold when applying the kernel.
    void
    setOutsideAtThreshold(boolean outsideAtThreshold)
    If true, considers voxels outside the object at the threshold as part of the object.

    Methods inherited from class org.anchoranalysis.image.feature.bean.object.single.FeatureSingleObject

    inputType

    Methods inherited from class org.anchoranalysis.feature.bean.Feature

    assignTo, beforeCalc, calculateCheckInitialized, castAs, createListChildFeatures, describeBean, describeParameters, descriptionLong, duplicateChangeName, getCustomName, getFriendlyName, onInitialization, setCustomName, toString

    Methods inherited from class org.anchoranalysis.bean.initializable.InitializableBean

    getInitialization, getLogger, getPropertyInitializer, initialize, initializeRecursive, initRecursiveWithInitializer, isInitialized

    Methods inherited from class org.anchoranalysis.bean.AnchorBean

    checkMisconfigured, describeChildren, duplicateBean, fields, findFieldsOfClass, getBeanName, getLocalPath, localise

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
  • Constructor Details

    • OutlineKernelBase

      public OutlineKernelBase()
  • Method Details

    • calculate

      protected double calculate(FeatureCalculationInput<FeatureInputSingleObject> input) throws FeatureCalculationException
      Specified by:
      calculate in class Feature<FeatureInputSingleObject>
      Throws:
      FeatureCalculationException
    • 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.