Class DerivedObject

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.morphological.DerivedObject
Direct Known Subclasses:
Erode, Shell

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

    Constructors 
    Constructor Description
    DerivedObject()  
  • Method Summary

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

  • Method Details

    • calculate

      public 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
    • createCachedCalculationForDerived

      protected abstract org.anchoranalysis.feature.calculate.part.CalculationPart<org.anchoranalysis.image.voxel.object.ObjectMask,​org.anchoranalysis.image.feature.input.FeatureInputSingleObject> createCachedCalculationForDerived​(org.anchoranalysis.feature.calculate.part.CalculationPartResolver<org.anchoranalysis.image.feature.input.FeatureInputSingleObject> session) throws org.anchoranalysis.feature.calculate.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:
      org.anchoranalysis.feature.calculate.FeatureCalculationException - if the calculation fails
    • cacheName

      protected abstract org.anchoranalysis.feature.calculate.cache.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 org.anchoranalysis.feature.bean.Feature<org.anchoranalysis.image.feature.input.FeatureInputSingleObject> getItem()
      The feature to calculate on the derived object.
    • setItem

      public void setItem​(org.anchoranalysis.feature.bean.Feature<org.anchoranalysis.image.feature.input.FeatureInputSingleObject> item)
      The feature to calculate on the derived object.