Class MaskAsSingleObject<T extends FeatureInputEnergy>
Object
AnchorBean<Feature<T>>
InitializableBean<Feature<T>,FeatureInitialization>
Feature<T>
FeatureEnergy<T>
FeatureSingleObjectFromShared<T>
MaskAsSingleObject<T>
- Type Parameters:
T
- feature-input type that extendsFeatureInputEnergy
public class MaskAsSingleObject<T extends FeatureInputEnergy>
extends FeatureSingleObjectFromShared<T>
Calculates a feature, treating a mask as a single-object on the energy-stack.
This class extends FeatureSingleObjectFromShared
to provide functionality for treating
a mask as a single object when calculating features.
- Author:
- Owen Feehan
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected void
beforeCalcWithInitialization
(ImageInitialization initialization) Performs initialization before calculation with image-specific initialization.protected double
calc
(CalculateForChild<T> calculateForChild, Feature<FeatureInputSingleObject> featureForSingleObject) Calculates the feature value for a single object.getMask()
The provider for the mask to be treated as a single object.void
setMask
(MaskProvider mask) The provider for the mask to be treated as a single object.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
-
Constructor Details
-
MaskAsSingleObject
public MaskAsSingleObject()
-
-
Method Details
-
beforeCalcWithInitialization
protected void beforeCalcWithInitialization(ImageInitialization initialization) throws InitializeException Description copied from class:FeatureSingleObjectFromShared
Performs initialization before calculation with image-specific initialization.- Specified by:
beforeCalcWithInitialization
in 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:FeatureSingleObjectFromShared
Calculates the feature value for a single object.- Specified by:
calc
in 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
-
getMask
The provider for the mask to be treated as a single object. -
setMask
The provider for the mask to be treated as a single object.
-