Class ObjectAggregationBase<T extends FeatureInputEnergy>
Object
AnchorBean<Feature<T>>
InitializableBean<Feature<T>, FeatureInitialization>
Feature<T>
FeatureEnergy<T>
FeatureSingleObjectFromShared<T>
ObjectAggregationBase<T>
- Type Parameters:
T- feature-input type that extendsFeatureInputEnergy
- Direct Known Subclasses:
MeanAcrossObjects,QuantileAcrossObjects
public abstract class ObjectAggregationBase<T extends 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 -
Method Summary
Modifier and TypeMethodDescriptionprotected voidbeforeCalcWithInitialization(ImageInitialization initialization) Performs initialization before calculation with image-specific initialization.protected doublecalc(CalculateForChild<T> calculateForChild, Feature<FeatureInputSingleObject> featureForSingleObject) Calculates the feature value for a single object.protected abstract doublederiveStatistic(cern.colt.list.DoubleArrayList featureVals) Derives a statistic from the calculated feature values for all objects.ObjectCollectionProviderThe provider for the collection of objects to calculate features on.voidsetObjects(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, setItemMethods inherited from class org.anchoranalysis.feature.bean.Feature
assignTo, calculateCheckInitialized, castAs, createListChildFeatures, describeBean, describeParameters, descriptionLong, duplicateChangeName, getCustomName, getFriendlyName, onInitialization, setCustomName, toStringMethods inherited from class org.anchoranalysis.bean.initializable.InitializableBean
getInitialization, getLogger, getPropertyInitializer, initialize, initializeRecursive, initRecursiveWithInitializer, isInitializedMethods inherited from class org.anchoranalysis.bean.AnchorBean
checkMisconfigured, describeChildren, duplicateBean, fields, findFieldsOfClass, getBeanName, getLocalPath, localise
-
Constructor Details
-
ObjectAggregationBase
public ObjectAggregationBase()
-
-
Method Details
-
beforeCalcWithInitialization
protected void beforeCalcWithInitialization(ImageInitialization initialization) throws InitializeException Description copied from class:FeatureSingleObjectFromSharedPerforms initialization before calculation with image-specific initialization.- Specified by:
beforeCalcWithInitializationin classFeatureSingleObjectFromShared<T extends FeatureInputEnergy>- Parameters:
initialization- the image-specific initialization- Throws:
InitializeException- if initialization fails
-
calc
protected double calc(CalculateForChild<T> calculateForChild, Feature<FeatureInputSingleObject> featureForSingleObject) throws FeatureCalculationException Description copied from class:FeatureSingleObjectFromSharedCalculates the feature value for a single object.- Specified by:
calcin classFeatureSingleObjectFromShared<T extends FeatureInputEnergy>- Parameters:
calculateForChild- the calculation context for child featuresfeatureForSingleObject- the feature to calculate on a single object- Returns:
- the calculated feature value
- Throws:
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 ObjectCollectionProvider getObjects()The provider for the collection of objects to calculate features on. -
setObjects
public void setObjects(ObjectCollectionProvider objects) The provider for the collection of objects to calculate features on.
-