Class AbstractObjectClassifier<T>

java.lang.Object
qupath.lib.classifiers.object.AbstractObjectClassifier<T>
Type Parameters:
T -
All Implemented Interfaces:
ObjectClassifier<T>
Direct Known Subclasses:
DnnObjectClassifier, OpenCVMLClassifier, OpenCVModelObjectClassifier

public abstract class AbstractObjectClassifier<T> extends Object implements ObjectClassifier<T>
Abstract class to help with the creation of object classifiers.
Author:
Pete Bankhead
  • Constructor Details

    • AbstractObjectClassifier

      protected AbstractObjectClassifier(PathObjectFilter filter)
  • Method Details

    • classifyObjects

      public int classifyObjects(ImageData<T> imageData, boolean resetExistingClass)
      Description copied from interface: ObjectClassifier
      Classify all compatible objects from an ImageData.

      Note: this method does not typically fire any hierarchy change/object classification events. It is up to the caller to fire these events if required.

      Specified by:
      classifyObjects in interface ObjectClassifier<T>
      Parameters:
      imageData - data containing the object hierarchy
      resetExistingClass -
      Returns:
      the number of objects whose classification was changed.
      See Also:
    • getCompatibleObjects

      public Collection<PathObject> getCompatibleObjects(ImageData<T> imageData)
      Description copied from interface: ObjectClassifier
      Get the objects from an ImageData that are compatible with this classifier.
      Specified by:
      getCompatibleObjects in interface ObjectClassifier<T>
      Parameters:
      imageData -
      Returns:
      a collection of compatible objects, or empty list if no compatible objects are found