Class ThresholdedFeature

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

public class ThresholdedFeature extends ObjectFilterRelation
Only keeps objects whose feature-value satisfies a condition relative to a threshold.

Specifically, relation(featureValue,threshold) must be true.

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>
     
    double
     
    boolean
     
    protected boolean
    match(ObjectMask object, Optional<Dimensions> dim, DoubleBiPredicate relation)
    Performs the matching operation using the resolved relation.
    void
    setDebug(boolean debug)
     
    void
    setFeatureEvaluator(FeatureEvaluator<FeatureInputSingleObject> featureEvaluator)
     
    void
    setThreshold(double threshold)
     
    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.ObjectFilterRelation

    getRelation, match, precondition, setRelation

    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

    • ThresholdedFeature

      public ThresholdedFeature()
  • Method Details

    • 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 ObjectFilterRelation
      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> dim, DoubleBiPredicate relation) throws OperationFailedException
      Description copied from class: ObjectFilterRelation
      Performs the matching operation using the resolved relation.
      Specified by:
      match in class ObjectFilterRelation
      Parameters:
      object - the ObjectMask to be evaluated
      dim - optional Dimensions of the object
      relation - the resolved DoubleBiPredicate relation
      Returns:
      true if the object matches the criteria, 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.
      Overrides:
      end in class ObjectFilterRelation
      Throws:
      OperationFailedException - if the cleanup operation fails
    • getFeatureEvaluator

      public FeatureEvaluator<FeatureInputSingleObject> getFeatureEvaluator()
    • setFeatureEvaluator

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

      public double getThreshold()
    • setThreshold

      public void setThreshold(double threshold)
    • isDebug

      public boolean isDebug()
    • setDebug

      public void setDebug(boolean debug)