Package qupath.process.gui.commands.ml
Class BoundaryStrategy
java.lang.Object
qupath.process.gui.commands.ml.BoundaryStrategy
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).
-
Method Summary
Modifier and TypeMethodDescriptionbooleangetBoundaryClass(PathClass pathClass) Get the classification to be used for the annotation boundary, given the classification of the annotated region.doubleGet the boundary thickness, in pixels.static BoundaryStrategygetClassifyBoundaryStrategy(PathClass pathClass, double thickness) Create a boundary strategy that trains a classifier for a specific PathClass for annotation boundaries.static BoundaryStrategygetDerivedBoundaryStrategy(double thickness) Create a boundary strategy that trains a classifier for a PathClass derived from the original classification for annotation boundaries.static BoundaryStrategyCreate a boundary strategy that ignores boundaries, not using them for classifier training.inthashCode()static BoundaryStrategysetThickness(BoundaryStrategy strategy, double thickness) Create a boundary strategy with the specified thickness.toString()
-
Method Details
-
getBoundaryThickness
public double getBoundaryThickness()Get the boundary thickness, in pixels.- Returns:
-
getBoundaryClass
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
-
hashCode
public int hashCode() -
equals
-
getClassifyBoundaryStrategy
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 asgetSkipBoundaryStrategy()- Parameters:
pathClass-thickness-- Returns:
-
getDerivedBoundaryStrategy
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 asgetSkipBoundaryStrategy()- Parameters:
thickness-- Returns:
-
getSkipBoundaryStrategy
Create a boundary strategy that ignores boundaries, not using them for classifier training.- Returns:
-
setThickness
Create a boundary strategy with the specified thickness.- Parameters:
strategy- method for handling boundariesthickness- the required thickness- Returns:
-