Class FilterByGroup

Object
AnchorBean<ObjectCollectionProvider>
InitializableBean<ObjectCollectionProvider, ImageInitialization>
ImageBean<ObjectCollectionProvider>
ObjectCollectionProvider
ObjectCollectionProviderUnary
All Implemented Interfaces:
Provider<ObjectCollection>

public class FilterByGroup extends ObjectCollectionProviderFilterBase
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
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    protected ObjectCollection
    createFromObjects(ObjectCollection objects, Optional<List<ObjectMask>> objectsRejected, Optional<Dimensions> dim)
    Creates an ObjectCollection from the given objects, potentially applying a filter and considering dimensions.
    ObjectCollectionProvider
    Provides the ObjectCollection used for grouping the objects to be filtered.
    void
    setObjectsGrouped(ObjectCollectionProvider objectsGrouped)
    Provides the ObjectCollection used for grouping the objects to be filtered.

    Methods inherited from class org.anchoranalysis.plugin.image.bean.object.provider.filter.ObjectCollectionProviderFilterBase

    createFromObjects, filter, getFilter, setFilter

    Methods inherited from class org.anchoranalysis.plugin.image.bean.object.provider.WithOptionalDimensionsBase

    createDims, getDimensions, setDimensions

    Methods inherited from class org.anchoranalysis.image.bean.provider.ObjectCollectionProviderUnary

    get, getObjects, setObjects

    Methods inherited from class org.anchoranalysis.bean.initializable.InitializableBean

    getInitialization, getLogger, getPropertyInitializer, initialize, initializeRecursive, initRecursiveWithInitializer, isInitialized, onInitialization

    Methods inherited from class org.anchoranalysis.bean.AnchorBean

    checkMisconfigured, 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

    • FilterByGroup

      public FilterByGroup()
  • Method Details

    • createFromObjects

      protected ObjectCollection createFromObjects(ObjectCollection objects, Optional<List<ObjectMask>> objectsRejected, Optional<Dimensions> dim) throws ProvisionFailedException
      Description copied from class: ObjectCollectionProviderFilterBase
      Creates an ObjectCollection from the given objects, potentially applying a filter and considering dimensions.
      Specified by:
      createFromObjects in class ObjectCollectionProviderFilterBase
      Parameters:
      objects - the input ObjectCollection
      objectsRejected - optional list to store rejected ObjectMasks
      dim - optional Dimensions of the objects
      Returns:
      the created ObjectCollection
      Throws:
      ProvisionFailedException - if creation fails
    • getObjectsGrouped

      public ObjectCollectionProvider getObjectsGrouped()
      Provides the ObjectCollection used for grouping the objects to be filtered.
    • setObjectsGrouped

      public void setObjectsGrouped(ObjectCollectionProvider objectsGrouped)
      Provides the ObjectCollection used for grouping the objects to be filtered.