Class EachObjectIndependently
Object
AnchorBean<CombineObjectsForFeatures<FeatureInputSingleObject>>
CombineObjectsForFeatures<FeatureInputSingleObject>
EachObjectIndependently
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
ConstructorsConstructorDescriptionEachObjectIndependently(Interpolator interpolator) Create with a specific interpolator. -
Method Summary
Modifier and TypeMethodDescriptionprotected BoundingBoxboundingBoxThatSpansInput(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 aFeatureTableCalculatorfrom aNamedFeatureStore.ObjectCollectionobjectsForThumbnail(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, setThumbnailMethods inherited from class org.anchoranalysis.bean.AnchorBean
describeBean, describeChildren, duplicateBean, fields, findFieldsOfClass, getBeanName, getLocalPath, localise, toString
-
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:CombineObjectsForFeaturesCreates features that will be applied on the objects. Features should always be duplicated from the input list.- Specified by:
createFeaturesin classCombineObjectsForFeatures<FeatureInputSingleObject>- Parameters:
list- beans defining features to be applied to single-objects.storeFactory- creates a newNamedFeatureStoreas needed.suppressErrors- when true, exceptions aren't thrown when feature-calculations fail, but rather a log error message is written.- Returns:
- a
FeatureTableCalculatorfor feature tables that may apply various features derived fromfeaturesSingleObject. - Throws:
CreateException- if there's an error creating the features.
-
createFeatures
public FeatureTableCalculator<FeatureInputSingleObject> createFeatures(NamedFeatureStore<FeatureInputSingleObject> features) Creates aFeatureTableCalculatorfrom aNamedFeatureStore.- Parameters:
features- the named feature store containing the features to be calculated- Returns:
- a new
FeatureTableCalculatorfor the given features
-
uniqueIdentifierFor
Description copied from class:CombineObjectsForFeaturesGenerates a unique identifier for a particular input.- Specified by:
uniqueIdentifierForin classCombineObjectsForFeatures<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:CombineObjectsForFeaturesDerives a list of inputs from an object-collection.- Specified by:
startBatchDeriveInputsin classCombineObjectsForFeatures<FeatureInputSingleObject>- Parameters:
objects- the object-collectionenergyStack- energy-stack used during feature calculationlogger- 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:CombineObjectsForFeaturesSelects objects from an input that will be used for thumbnail generation.- Specified by:
objectsForThumbnailin classCombineObjectsForFeatures<FeatureInputSingleObject>- Parameters:
input- the input- Returns:
- the
ObjectCollectionfor thumbnail generation - Throws:
CreateException- if there's an error creating the object collection
-
boundingBoxThatSpansInput
protected BoundingBox boundingBoxThatSpansInput(FeatureInputSingleObject input) Description copied from class:CombineObjectsForFeaturesCreates a bounding-box that tightly fits the input to a particular table row (could be for one or more objects).- Specified by:
boundingBoxThatSpansInputin classCombineObjectsForFeatures<FeatureInputSingleObject>- Parameters:
input- the input- Returns:
- a
BoundingBoxthat fully fits around all objects used in input
-