Class ExtractFromLocation

Object
AnchorBean<Feature<FeatureInputImageMetadata>>
InitializableBean<Feature<FeatureInputImageMetadata>, FeatureInitialization>
Feature<FeatureInputImageMetadata>
FeatureImageMetadata
ExtractFromLocation
Direct Known Subclasses:
Latitude, Longitude

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
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    double
    calculate(ImageMetadata metadata)
     
    protected abstract double
    extractValue(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, inputType

    Methods inherited from class org.anchoranalysis.feature.bean.Feature

    assignTo, beforeCalc, 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

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
  • Constructor Details

    • ExtractFromLocation

      public ExtractFromLocation()
  • Method Details

    • calculate

      public double calculate(ImageMetadata metadata) throws FeatureCalculationException
      Specified by:
      calculate in class FeatureImageMetadata
      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.