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
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.ChildCacheNamecacheName()Provides a unique name for caching the derived object.doublecalculate(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 aCalculationPartfor deriving the object mask.doublegetEmptyValue()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.voidsetEmptyValue(double emptyValue)The value to return when the derived object is empty.voidsetItem(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
inputTypeMethods inherited from class org.anchoranalysis.feature.bean.Feature
assignTo, beforeCalc, 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, isInitialized
-
Constructor Details
-
DerivedObject
public DerivedObject()
-
-
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:
calculatein classorg.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.FeatureCalculationExceptionCreates aCalculationPartfor deriving the object mask.- Parameters:
session- theCalculationPartResolverfor resolving calculation parts- Returns:
- a
CalculationPartthat derives anObjectMask - 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
ChildCacheNamefor 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.
-