Class ExtractFromLocation
Object
AnchorBean<Feature<FeatureInputImageMetadata>>
InitializableBean<Feature<FeatureInputImageMetadata>, FeatureInitialization>
Feature<FeatureInputImageMetadata>
FeatureImageMetadata
ExtractFromLocation
public abstract class ExtractFromLocation
extends FeatureImageMetadata
Extracts a double value from a
ImageLocation if it exists in a ImageMetadata.
If the location is unknown, then Double.NaN is returned.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiondoublecalculate(ImageMetadata metadata) protected abstract doubleextractValue(ImageLocation location) Extracts the value that is returned from the feature if an image-location is present.Methods inherited from class org.anchoranalysis.image.feature.bean.FeatureImageMetadata
calculate, 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, isInitializedMethods inherited from class org.anchoranalysis.bean.AnchorBean
checkMisconfigured, describeChildren, duplicateBean, fields, findFieldsOfClass, getBeanName, getLocalPath, localise
-
Constructor Details
-
ExtractFromLocation
public ExtractFromLocation()
-
-
Method Details
-
calculate
public double calculate(ImageMetadata metadata) throws FeatureCalculationException - Specified by:
calculatein classFeatureImageMetadata- Throws:
FeatureCalculationException
-
extractValue
protected abstract double extractValue(ImageLocation location) Extracts the value that is returned from the feature if an image-location is present.- Parameters:
location- the location to extract the value from.- Returns:
- the value to be returned.
-