Class MaskAsSingleObject<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.MaskAsSingleObject<T>
- Type Parameters:
T- feature-input type that extendsFeatureInputEnergy
public class MaskAsSingleObject<T extends org.anchoranalysis.feature.input.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 Constructor Description MaskAsSingleObject() -
Method Summary
Modifier and Type Method Description protected voidbeforeCalcWithInitialization(org.anchoranalysis.image.bean.nonbean.init.ImageInitialization initialization)Performs initialization before calculation with image-specific initialization.protected doublecalc(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.org.anchoranalysis.image.bean.provider.MaskProvidergetMask()The provider for the mask to be treated as a single object.voidsetMask(org.anchoranalysis.image.bean.provider.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, 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, isInitialized
-
Constructor Details
-
MaskAsSingleObject
public MaskAsSingleObject()
-
-
Method Details
-
beforeCalcWithInitialization
protected void beforeCalcWithInitialization(org.anchoranalysis.image.bean.nonbean.init.ImageInitialization initialization) throws org.anchoranalysis.core.exception.InitializeExceptionDescription copied from class:FeatureSingleObjectFromSharedPerforms initialization before calculation with image-specific initialization.- Specified by:
beforeCalcWithInitializationin classFeatureSingleObjectFromShared<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.FeatureCalculationExceptionDescription copied from class:FeatureSingleObjectFromSharedCalculates the feature value for a single object.- Specified by:
calcin classFeatureSingleObjectFromShared<T extends org.anchoranalysis.feature.input.FeatureInputEnergy>- Parameters:
calculateForChild- the calculation context for child featuresfeatureForSingleObject- the feature to calculate on a single object- Returns:
- the calculated feature value
- Throws:
org.anchoranalysis.feature.calculate.FeatureCalculationException- if the calculation fails
-
getMask
public org.anchoranalysis.image.bean.provider.MaskProvider getMask()The provider for the mask to be treated as a single object. -
setMask
public void setMask(org.anchoranalysis.image.bean.provider.MaskProvider mask)The provider for the mask to be treated as a single object.
-