Class FilterByGroup
Object
AnchorBean<ObjectCollectionProvider>
InitializableBean<ObjectCollectionProvider, ImageInitialization>
ImageBean<ObjectCollectionProvider>
ObjectCollectionProvider
ObjectCollectionProviderUnary
WithOptionalDimensionsBase
ObjectCollectionProviderFilterBase
FilterByGroup
- All Implemented Interfaces:
Provider<ObjectCollection>
Filters an
ObjectCollection by grouping objects and then applying a filter to each group.
Objects are grouped based on their intersection with objects from another collection, and then the filter is applied to each group independently.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected ObjectCollectioncreateFromObjects(ObjectCollection objects, Optional<List<ObjectMask>> objectsRejected, Optional<Dimensions> dim) Creates anObjectCollectionfrom the given objects, potentially applying a filter and considering dimensions.ObjectCollectionProviderProvides theObjectCollectionused for grouping the objects to be filtered.voidsetObjectsGrouped(ObjectCollectionProvider objectsGrouped) Provides theObjectCollectionused for grouping the objects to be filtered.Methods inherited from class org.anchoranalysis.plugin.image.bean.object.provider.filter.ObjectCollectionProviderFilterBase
createFromObjects, filter, getFilter, setFilterMethods inherited from class org.anchoranalysis.plugin.image.bean.object.provider.WithOptionalDimensionsBase
createDims, getDimensions, setDimensionsMethods inherited from class org.anchoranalysis.image.bean.provider.ObjectCollectionProviderUnary
get, getObjects, setObjectsMethods inherited from class org.anchoranalysis.bean.initializable.InitializableBean
getInitialization, getLogger, getPropertyInitializer, initialize, initializeRecursive, initRecursiveWithInitializer, isInitialized, onInitializationMethods inherited from class org.anchoranalysis.bean.AnchorBean
checkMisconfigured, describeBean, describeChildren, duplicateBean, fields, findFieldsOfClass, getBeanName, getLocalPath, localise, toString
-
Constructor Details
-
FilterByGroup
public FilterByGroup()
-
-
Method Details
-
createFromObjects
protected ObjectCollection createFromObjects(ObjectCollection objects, Optional<List<ObjectMask>> objectsRejected, Optional<Dimensions> dim) throws ProvisionFailedException Description copied from class:ObjectCollectionProviderFilterBaseCreates anObjectCollectionfrom the given objects, potentially applying a filter and considering dimensions.- Specified by:
createFromObjectsin classObjectCollectionProviderFilterBase- Parameters:
objects- the inputObjectCollectionobjectsRejected- optional list to store rejectedObjectMasksdim- optionalDimensionsof the objects- Returns:
- the created
ObjectCollection - Throws:
ProvisionFailedException- if creation fails
-
getObjectsGrouped
public ObjectCollectionProvider getObjectsGrouped()Provides theObjectCollectionused for grouping the objects to be filtered. -
setObjectsGrouped
public void setObjectsGrouped(ObjectCollectionProvider objectsGrouped) Provides theObjectCollectionused for grouping the objects to be filtered.
-