Package qupath.lib.objects.classes
Class Reclassifier
java.lang.Object
qupath.lib.objects.classes.Reclassifier
Helper class when classifying PathObjects.
 
When applying a classifier to make objects, it's desirable to make updating the classification an atomic operation, applied to all objects in one go. Consequently, it the classifier is aborted early (e.g. the thread interrupted), then the objects are not partially reclassified.
- 
Constructor SummaryConstructorsConstructorDescriptionReclassifier(PathObject pathObject, PathClass pathClass, boolean retainIntensityClass) Helper class to store an object prior to reclassifying it.Reclassifier(PathObject pathObject, PathClass pathClass, boolean retainIntensityClass, double probability) Helper class to store an object prior to reclassifying it, including a classification probability.
- 
Method SummaryModifier and TypeMethodDescriptionbooleanapply()Apply the stored classification.Get the stored PathObject for which the PathClass may be set.
- 
Constructor Details- 
ReclassifierHelper class to store an object prior to reclassifying it.- Parameters:
- pathObject-
- pathClass-
- retainIntensityClass- of we have a single-level or two-level PathClass, with the second element an intensity classification, optionally retain this and only update the base class.
 
- 
Reclassifierpublic Reclassifier(PathObject pathObject, PathClass pathClass, boolean retainIntensityClass, double probability) Helper class to store an object prior to reclassifying it, including a classification probability.- Parameters:
- pathObject- an object whose classification may be set by a subsequent call to- apply()
- pathClass- the classification that may be applied to pathObject
- retainIntensityClass- of we have a single-level or two-level PathClass, with the second element an intensity classification, optionally retain this and only update the base class.
- probability- optional classification probability value to store in the object (may be Double.NaN if this should be ignored).
 
 
- 
- 
Method Details- 
applypublic boolean apply()Apply the stored classification.- Returns:
- true if the classification for the object changed, false otherwise.
 
- 
getPathObjectGet the stored PathObject for which the PathClass may be set.- Returns:
 
 
-