Class DerivedObject

Object
AnchorBean<Feature<FeatureInputSingleObject>>
InitializableBean<Feature<FeatureInputSingleObject>, FeatureInitialization>
Feature<FeatureInputSingleObject>
FeatureSingleObject
DerivedObject
Direct Known Subclasses:
Erode, Shell

public abstract class DerivedObject extends FeatureSingleObject
A base class for features that operate on a derived object mask and calculate a feature on it.
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    protected abstract ChildCacheName
    Provides a unique name for caching the derived object.
    double
    calculate(FeatureCalculationInput<FeatureInputSingleObject> input)
     
    protected abstract CalculationPart<ObjectMask, FeatureInputSingleObject>
    createCachedCalculationForDerived(CalculationPartResolver<FeatureInputSingleObject> session)
    Creates a CalculationPart for deriving the object mask.
    double
    The value to return when the derived object is empty.
    Feature<FeatureInputSingleObject>
    The feature to calculate on the derived object.
    void
    setEmptyValue(double emptyValue)
    The value to return when the derived object is empty.
    void
    setItem(Feature<FeatureInputSingleObject> item)
    The feature to calculate on the derived 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

    • DerivedObject

      public DerivedObject()
  • Method Details

    • calculate

      public double calculate(FeatureCalculationInput<FeatureInputSingleObject> input) throws FeatureCalculationException
      Specified by:
      calculate in class Feature<FeatureInputSingleObject>
      Throws:
      FeatureCalculationException
    • createCachedCalculationForDerived

      protected abstract CalculationPart<ObjectMask, FeatureInputSingleObject> createCachedCalculationForDerived(CalculationPartResolver<FeatureInputSingleObject> session) throws FeatureCalculationException
      Creates a CalculationPart for deriving the object mask.
      Parameters:
      session - the CalculationPartResolver for resolving calculation parts
      Returns:
      a CalculationPart that derives an ObjectMask
      Throws:
      FeatureCalculationException - if the calculation fails
    • cacheName

      protected abstract ChildCacheName cacheName()
      Provides a unique name for caching the derived object.
      Returns:
      a ChildCacheName for caching the derived object
    • getEmptyValue

      public double getEmptyValue()
      The value to return when the derived object is empty.
    • setEmptyValue

      public void setEmptyValue(double emptyValue)
      The value to return when the derived object is empty.
    • getItem

      public Feature<FeatureInputSingleObject> getItem()
      The feature to calculate on the derived object.
    • setItem

      public void setItem(Feature<FeatureInputSingleObject> item)
      The feature to calculate on the derived object.