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).
- Author:
- Pete Bankhead
-
Method Summary
Modifier and TypeMethodDescriptionboolean
getBoundaryClass
(PathClass pathClass) Get the classification to be used for the annotation boundary, given the classification of the annotated region.double
Get the boundary thickness, in pixels.static BoundaryStrategy
getClassifyBoundaryStrategy
(PathClass pathClass, double thickness) Create a boundary strategy that trains a classifier for a specific PathClass for annotation boundaries.static BoundaryStrategy
getDerivedBoundaryStrategy
(double thickness) Create a boundary strategy that trains a classifier for a PathClass derived from the original classification for annotation boundaries.static BoundaryStrategy
Create a boundary strategy that ignores boundaries, not using them for classifier training.int
hashCode()
static BoundaryStrategy
setThickness
(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:
-