Class EachObjectIndependently

Object
AnchorBean<CombineObjectsForFeatures<FeatureInputSingleObject>>
CombineObjectsForFeatures<FeatureInputSingleObject>
EachObjectIndependently

public class EachObjectIndependently extends CombineObjectsForFeatures<FeatureInputSingleObject>
Selects features and objects directly from the input list, treating each object independently.

This class does not combine objects, but rather processes each object individually.

Author:
Owen Feehan
  • Constructor Summary

    Constructors
    Constructor
    Description
     
    EachObjectIndependently(Interpolator interpolator)
    Create with a specific interpolator.
  • Method Summary

    Modifier and Type
    Method
    Description
    protected BoundingBox
    boundingBoxThatSpansInput(FeatureInputSingleObject input)
    Creates a bounding-box that tightly fits the input to a particular table row (could be for one or more objects).
    FeatureTableCalculator<FeatureInputSingleObject>
    createFeatures(List<NamedBean<FeatureListProvider<FeatureInputSingleObject>>> list, NamedFeatureStoreFactory storeFactory, boolean suppressErrors)
    Creates features that will be applied on the objects.
    FeatureTableCalculator<FeatureInputSingleObject>
    createFeatures(NamedFeatureStore<FeatureInputSingleObject> features)
    Creates a FeatureTableCalculator from a NamedFeatureStore.
    ObjectCollection
    objectsForThumbnail(FeatureInputSingleObject input)
    Selects objects from an input that will be used for thumbnail generation.
    List<FeatureInputSingleObject>
    startBatchDeriveInputs(ObjectCollection objects, EnergyStack energyStack, Logger logger)
    Derives a list of inputs from an object-collection.
    uniqueIdentifierFor(FeatureInputSingleObject input)
    Generates a unique identifier for a particular input.

    Methods inherited from class org.anchoranalysis.plugin.image.feature.bean.object.combine.CombineObjectsForFeatures

    checkMisconfigured, deriveInputsStartBatch, getInterpolator, getThumbnail, setInterpolator, setThumbnail

    Methods inherited from class org.anchoranalysis.bean.AnchorBean

    describeBean, describeChildren, duplicateBean, fields, findFieldsOfClass, getBeanName, getLocalPath, localise, toString

    Methods inherited from class java.lang.Object

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

    • EachObjectIndependently

      public EachObjectIndependently(Interpolator interpolator)
      Create with a specific interpolator.
      Parameters:
      interpolator - interpolator used to resize images in thumbnail generation.
    • EachObjectIndependently

      public EachObjectIndependently()
  • Method Details

    • createFeatures

      public FeatureTableCalculator<FeatureInputSingleObject> createFeatures(List<NamedBean<FeatureListProvider<FeatureInputSingleObject>>> list, NamedFeatureStoreFactory storeFactory, boolean suppressErrors) throws CreateException
      Description copied from class: CombineObjectsForFeatures
      Creates features that will be applied on the objects. Features should always be duplicated from the input list.
      Specified by:
      createFeatures in class CombineObjectsForFeatures<FeatureInputSingleObject>
      Parameters:
      list - beans defining features to be applied to single-objects.
      storeFactory - creates a new NamedFeatureStore as needed.
      suppressErrors - when true, exceptions aren't thrown when feature-calculations fail, but rather a log error message is written.
      Returns:
      a FeatureTableCalculator for feature tables that may apply various features derived from featuresSingleObject.
      Throws:
      CreateException - if there's an error creating the features.
    • createFeatures

      public FeatureTableCalculator<FeatureInputSingleObject> createFeatures(NamedFeatureStore<FeatureInputSingleObject> features)
      Creates a FeatureTableCalculator from a NamedFeatureStore.
      Parameters:
      features - the named feature store containing the features to be calculated
      Returns:
      a new FeatureTableCalculator for the given features
    • uniqueIdentifierFor

      public String uniqueIdentifierFor(FeatureInputSingleObject input)
      Description copied from class: CombineObjectsForFeatures
      Generates a unique identifier for a particular input.
      Specified by:
      uniqueIdentifierFor in class CombineObjectsForFeatures<FeatureInputSingleObject>
      Parameters:
      input - the input to generate a unique identifier for
      Returns:
      a unique identifier string
    • startBatchDeriveInputs

      public List<FeatureInputSingleObject> startBatchDeriveInputs(ObjectCollection objects, EnergyStack energyStack, Logger logger) throws CreateException
      Description copied from class: CombineObjectsForFeatures
      Derives a list of inputs from an object-collection.
      Specified by:
      startBatchDeriveInputs in class CombineObjectsForFeatures<FeatureInputSingleObject>
      Parameters:
      objects - the object-collection
      energyStack - energy-stack used during feature calculation
      logger - the logger
      Returns:
      the list of inputs
      Throws:
      CreateException - if there's an error deriving the inputs
    • objectsForThumbnail

      public ObjectCollection objectsForThumbnail(FeatureInputSingleObject input) throws CreateException
      Description copied from class: CombineObjectsForFeatures
      Selects objects from an input that will be used for thumbnail generation.
      Specified by:
      objectsForThumbnail in class CombineObjectsForFeatures<FeatureInputSingleObject>
      Parameters:
      input - the input
      Returns:
      the ObjectCollection for thumbnail generation
      Throws:
      CreateException - if there's an error creating the object collection
    • boundingBoxThatSpansInput

      protected BoundingBox boundingBoxThatSpansInput(FeatureInputSingleObject input)
      Description copied from class: CombineObjectsForFeatures
      Creates a bounding-box that tightly fits the input to a particular table row (could be for one or more objects).
      Specified by:
      boundingBoxThatSpansInput in class CombineObjectsForFeatures<FeatureInputSingleObject>
      Parameters:
      input - the input
      Returns:
      a BoundingBox that fully fits around all objects used in input