Class 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 BoundingBox
Creates a bounding-box that tightly fits the input to a particular table row (could be for one or more objects).createFeatures
(List<NamedBean<FeatureListProvider<FeatureInputSingleObject>>> list, NamedFeatureStoreFactory storeFactory, boolean suppressErrors) Creates features that will be applied on the objects.Creates aFeatureTableCalculator
from aNamedFeatureStore
.Selects objects from an input that will be used for thumbnail generation.startBatchDeriveInputs
(ObjectCollection objects, EnergyStack energyStack, Logger logger) Derives a list of inputs from an object-collection.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
-
Constructor Details
-
EachObjectIndependently
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 classCombineObjectsForFeatures<FeatureInputSingleObject>
- Parameters:
list
- beans defining features to be applied to single-objects.storeFactory
- creates a newNamedFeatureStore
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 fromfeaturesSingleObject
. - Throws:
CreateException
- if there's an error creating the features.
-
createFeatures
public FeatureTableCalculator<FeatureInputSingleObject> createFeatures(NamedFeatureStore<FeatureInputSingleObject> features) Creates aFeatureTableCalculator
from aNamedFeatureStore
.- Parameters:
features
- the named feature store containing the features to be calculated- Returns:
- a new
FeatureTableCalculator
for the given features
-
uniqueIdentifierFor
Description copied from class:CombineObjectsForFeatures
Generates a unique identifier for a particular input.- Specified by:
uniqueIdentifierFor
in 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:CombineObjectsForFeatures
Derives a list of inputs from an object-collection.- Specified by:
startBatchDeriveInputs
in 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
Description copied from class:CombineObjectsForFeatures
Selects objects from an input that will be used for thumbnail generation.- Specified by:
objectsForThumbnail
in classCombineObjectsForFeatures<FeatureInputSingleObject>
- Parameters:
input
- the input- Returns:
- the
ObjectCollection
for thumbnail generation - Throws:
CreateException
- if there's an error creating the object collection
-
boundingBoxThatSpansInput
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 classCombineObjectsForFeatures<FeatureInputSingleObject>
- Parameters:
input
- the input- Returns:
- a
BoundingBox
that fully fits around all objects used in input
-