Class BoundaryStrategy

java.lang.Object
qupath.process.gui.commands.ml.BoundaryStrategy

public class BoundaryStrategy extends Object
Helper class for handling the boundaries of training annotations when creating a pixel classifier.

The purpose of this is to provide a mechanism for learning the separation between densely packed objects (e.g. nuclei).

Author:
Pete Bankhead
  • Method Details

    • getBoundaryThickness

      public double getBoundaryThickness()
      Get the boundary thickness, in pixels.
      Returns:
    • getBoundaryClass

      public PathClass getBoundaryClass(PathClass pathClass)
      Get the classification to be used for the annotation boundary, given the classification of the annotated region. Note that this returns null for 'ignored' or null classes.
      Parameters:
      pathClass -
      Returns:
      See Also:
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • equals

      public boolean equals(Object obj)
      Overrides:
      equals in class Object
    • getClassifyBoundaryStrategy

      public static BoundaryStrategy getClassifyBoundaryStrategy(PathClass pathClass, double thickness)
      Create a boundary strategy that trains a classifier for a specific PathClass for annotation boundaries. Note that if the pathClass is null or thickness ≤ 0 this is the same as getSkipBoundaryStrategy()
      Parameters:
      pathClass -
      thickness -
      Returns:
    • getDerivedBoundaryStrategy

      public static BoundaryStrategy getDerivedBoundaryStrategy(double thickness)
      Create a boundary strategy that trains a classifier for a PathClass derived from the original classification for annotation boundaries. Note that if the thickness ≤ 0 this is the same as getSkipBoundaryStrategy()
      Parameters:
      thickness -
      Returns:
    • getSkipBoundaryStrategy

      public static BoundaryStrategy getSkipBoundaryStrategy()
      Create a boundary strategy that ignores boundaries, not using them for classifier training.
      Returns:
    • setThickness

      public static BoundaryStrategy setThickness(BoundaryStrategy strategy, double thickness)
      Create a boundary strategy with the specified thickness.
      Parameters:
      strategy - method for handling boundaries
      thickness - the required thickness
      Returns: