Class ObjectAggregationBase<T extends org.anchoranalysis.feature.input.FeatureInputEnergy>

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<T>
org.anchoranalysis.image.feature.bean.FeatureEnergy<T>
org.anchoranalysis.plugin.image.feature.bean.shared.object.FeatureSingleObjectFromShared<T>
org.anchoranalysis.plugin.image.feature.bean.shared.object.ObjectAggregationBase<T>
Type Parameters:
T - feature-input type that extends FeatureInputEnergy
Direct Known Subclasses:
MeanAcrossObjects, QuantileAcrossObjects

public abstract class ObjectAggregationBase<T extends org.anchoranalysis.feature.input.FeatureInputEnergy>
extends FeatureSingleObjectFromShared<T>
Calculates a feature for a set of objects using this stack as an energy-stack, and aggregates.

This abstract class extends FeatureSingleObjectFromShared to provide functionality for calculating features on a collection of objects and aggregating the results.

Author:
Owen Feehan
  • Constructor Summary

    Constructors 
    Constructor Description
    ObjectAggregationBase()  
  • Method Summary

    Modifier and Type Method Description
    protected void beforeCalcWithInitialization​(org.anchoranalysis.image.bean.nonbean.init.ImageInitialization initialization)
    Performs initialization before calculation with image-specific initialization.
    protected double calc​(org.anchoranalysis.feature.calculate.cache.CalculateForChild<T> calculateForChild, org.anchoranalysis.feature.bean.Feature<org.anchoranalysis.image.feature.input.FeatureInputSingleObject> featureForSingleObject)
    Calculates the feature value for a single object.
    protected abstract double deriveStatistic​(cern.colt.list.DoubleArrayList featureVals)
    Derives a statistic from the calculated feature values for all objects.
    org.anchoranalysis.image.bean.provider.ObjectCollectionProvider getObjects()
    The provider for the collection of objects to calculate features on.
    void setObjects​(org.anchoranalysis.image.bean.provider.ObjectCollectionProvider objects)
    The provider for the collection of objects to calculate features on.

    Methods inherited from class org.anchoranalysis.plugin.image.feature.bean.shared.object.FeatureSingleObjectFromShared

    beforeCalc, calculate, getItem, inputType, setItem

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

    assignTo, 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

    • beforeCalcWithInitialization

      protected void beforeCalcWithInitialization​(org.anchoranalysis.image.bean.nonbean.init.ImageInitialization initialization) throws org.anchoranalysis.core.exception.InitializeException
      Description copied from class: FeatureSingleObjectFromShared
      Performs initialization before calculation with image-specific initialization.
      Specified by:
      beforeCalcWithInitialization in class FeatureSingleObjectFromShared<T extends org.anchoranalysis.feature.input.FeatureInputEnergy>
      Parameters:
      initialization - the image-specific initialization
      Throws:
      org.anchoranalysis.core.exception.InitializeException - if initialization fails
    • calc

      protected double calc​(org.anchoranalysis.feature.calculate.cache.CalculateForChild<T> calculateForChild, org.anchoranalysis.feature.bean.Feature<org.anchoranalysis.image.feature.input.FeatureInputSingleObject> featureForSingleObject) throws org.anchoranalysis.feature.calculate.FeatureCalculationException
      Description copied from class: FeatureSingleObjectFromShared
      Calculates the feature value for a single object.
      Specified by:
      calc in class FeatureSingleObjectFromShared<T extends org.anchoranalysis.feature.input.FeatureInputEnergy>
      Parameters:
      calculateForChild - the calculation context for child features
      featureForSingleObject - the feature to calculate on a single object
      Returns:
      the calculated feature value
      Throws:
      org.anchoranalysis.feature.calculate.FeatureCalculationException - if the calculation fails
    • deriveStatistic

      protected abstract double deriveStatistic​(cern.colt.list.DoubleArrayList featureVals)
      Derives a statistic from the calculated feature values for all objects.
      Parameters:
      featureVals - the list of feature values for all objects
      Returns:
      the derived statistic
    • getObjects

      public org.anchoranalysis.image.bean.provider.ObjectCollectionProvider getObjects()
      The provider for the collection of objects to calculate features on.
    • setObjects

      public void setObjects​(org.anchoranalysis.image.bean.provider.ObjectCollectionProvider objects)
      The provider for the collection of objects to calculate features on.