Class OutlineKernelBase

Object
org.anchoranalysis.bean.AnchorBean<B>
org.anchoranalysis.bean.initializable.InitializableBean<org.anchoranalysis.feature.bean.Feature<T>,​org.anchoranalysis.feature.initialization.FeatureInitialization>
org.anchoranalysis.feature.bean.Feature<org.anchoranalysis.image.feature.input.FeatureInputSingleObject>
org.anchoranalysis.image.feature.bean.object.single.FeatureSingleObject
org.anchoranalysis.plugin.image.feature.bean.object.single.OutlineKernelBase
Direct Known Subclasses:
NumberNeighboringVoxels, NumberVoxelsAtBorder

public abstract class OutlineKernelBase
extends org.anchoranalysis.image.feature.bean.object.single.FeatureSingleObject
Base class for features that apply a kernel to the outline of an object.
  • Constructor Summary

    Constructors 
    Constructor Description
    OutlineKernelBase()  
  • Method Summary

    Modifier and Type Method Description
    protected double calculate​(org.anchoranalysis.feature.calculate.FeatureCalculationInput<org.anchoranalysis.image.feature.input.FeatureInputSingleObject> input)  
    protected abstract double calculateWithParameters​(org.anchoranalysis.image.voxel.object.ObjectMask object, org.anchoranalysis.image.voxel.kernel.KernelApplicationParameters parameters, org.anchoranalysis.core.functional.checked.CheckedSupplier<org.anchoranalysis.feature.energy.EnergyStack,​org.anchoranalysis.feature.calculate.FeatureCalculationException> energyStack)
    Calculates the feature value using the specified parameters.
    boolean isDo3D()
    If true, applies the kernel in 3D; otherwise, applies it in 2D.
    boolean isIgnoreAtThreshold()
    If true, ignores voxels at the threshold when applying the kernel.
    boolean isOutsideAtThreshold()
    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

  • Method Details

    • calculate

      protected double calculate​(org.anchoranalysis.feature.calculate.FeatureCalculationInput<org.anchoranalysis.image.feature.input.FeatureInputSingleObject> input) throws org.anchoranalysis.feature.calculate.FeatureCalculationException
      Specified by:
      calculate in class org.anchoranalysis.feature.bean.Feature<org.anchoranalysis.image.feature.input.FeatureInputSingleObject>
      Throws:
      org.anchoranalysis.feature.calculate.FeatureCalculationException
    • calculateWithParameters

      protected abstract double calculateWithParameters​(org.anchoranalysis.image.voxel.object.ObjectMask object, org.anchoranalysis.image.voxel.kernel.KernelApplicationParameters parameters, org.anchoranalysis.core.functional.checked.CheckedSupplier<org.anchoranalysis.feature.energy.EnergyStack,​org.anchoranalysis.feature.calculate.FeatureCalculationException> energyStack) throws org.anchoranalysis.feature.calculate.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:
      org.anchoranalysis.feature.calculate.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.