Class DiscardOutliers

Object
AnchorBean<ObjectFilter>
InitializableBean<ObjectFilter, ImageInitialization>
ImageBean<ObjectFilter>
ObjectFilter
ObjectFilterPredicate
DiscardOutliers

public class DiscardOutliers extends ObjectFilterPredicate
Calculates features values for all objects, and discards any object less than quantile - (minRatio * stdDev)
Author:
Owen Feehan
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    protected void
    end()
    Performs any necessary cleanup after filtering is complete.
    FeatureEvaluator<FeatureInputSingleObject>
     
    int
     
    double
     
    double
     
    protected boolean
    match(ObjectMask object, Optional<Dimensions> dimensions)
    A predicate condition for an object to be kept in the collection.
    protected boolean
    precondition(ObjectCollection objectsToFilter)
    A precondition, which if evaluates to false, cancels the filter i.e.
    void
    setFeatureEvaluator(FeatureEvaluator<FeatureInputSingleObject> featureEvaluator)
     
    void
    setMinNumberObjects(int minNumberObjects)
     
    void
    setMinRatio(double minRatio)
     
    void
    setQuantile(double quantile)
     
    protected void
    start(Optional<Dimensions> dimensions, ObjectCollection objectsToFilter)
    Performs any necessary initialization before filtering begins.

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

    filter

    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

    • DiscardOutliers

      public DiscardOutliers()
  • Method Details

    • precondition

      protected boolean precondition(ObjectCollection objectsToFilter)
      Description copied from class: ObjectFilterPredicate
      A precondition, which if evaluates to false, cancels the filter i.e. nothing is removed.
      Specified by:
      precondition in class ObjectFilterPredicate
      Parameters:
      objectsToFilter - the ObjectCollection to be filtered
      Returns:
      true if the filter should be applied, false otherwise
    • start

      protected void start(Optional<Dimensions> dimensions, ObjectCollection objectsToFilter) throws OperationFailedException
      Description copied from class: ObjectFilterPredicate
      Performs any necessary initialization before filtering begins.
      Overrides:
      start in class ObjectFilterPredicate
      Parameters:
      dimensions - optional Dimensions of the objects
      objectsToFilter - the ObjectCollection to be filtered
      Throws:
      OperationFailedException - if the initialization fails
    • match

      protected boolean match(ObjectMask object, Optional<Dimensions> dimensions) throws OperationFailedException
      Description copied from class: ObjectFilterPredicate
      A predicate condition for an object to be kept in the collection.
      Specified by:
      match in class ObjectFilterPredicate
      Parameters:
      object - the ObjectMask to be evaluated
      dimensions - optional Dimensions of the object
      Returns:
      true if the object should be kept, false otherwise
      Throws:
      OperationFailedException - if the matching operation fails
    • end

      protected void end() throws OperationFailedException
      Description copied from class: ObjectFilterPredicate
      Performs any necessary cleanup after filtering is complete.
      Specified by:
      end in class ObjectFilterPredicate
      Throws:
      OperationFailedException - if the cleanup operation fails
    • getFeatureEvaluator

      public FeatureEvaluator<FeatureInputSingleObject> getFeatureEvaluator()
    • setFeatureEvaluator

      public void setFeatureEvaluator(FeatureEvaluator<FeatureInputSingleObject> featureEvaluator)
    • getQuantile

      public double getQuantile()
    • setQuantile

      public void setQuantile(double quantile)
    • getMinRatio

      public double getMinRatio()
    • setMinRatio

      public void setMinRatio(double minRatio)
    • getMinNumberObjects

      public int getMinNumberObjects()
    • setMinNumberObjects

      public void setMinNumberObjects(int minNumberObjects)