Package qupath.lib.objects
Class PathROIObject
java.lang.Object
qupath.lib.objects.PathObject
qupath.lib.objects.PathROIObject
- All Implemented Interfaces:
Externalizable,Serializable
- Direct Known Subclasses:
PathAnnotationObject,PathDetectionObject,TMACoreObject
Abstract class used for PathObjects that have ROIs associated with them.
In practice, this is almost all PathObjects (with the notable exception of PathRootObjects).
- Author:
- Pete Bankhead
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptiondoubleRequest the classification probability, or Double.NaN if no probability is available.Get the classification of the object.getROI()Get the region of interest (ROI) for the object.booleanDeprecated.since v0.4.0booleanisLocked()Query the locked status for the object, indicating whether it should be editable or not.voidvoidsetLocked(boolean locked) Set locked flag, indicating that the object ROI should not be modified.voidsetPathClass(PathClass pathClass, double classProbability) Set the classification of the object, specifying a classification probability.voidSet the ROI for this object.voidMethods inherited from class qupath.lib.objects.PathObject
addChildObject, addChildObjects, addPathObject, addPathObjects, clearChildObjects, clearMetadataMap, clearPathObjects, createEmptyMeasurementList, getChildObjects, getChildObjects, getChildObjectsAsArray, getClassifications, getColor, getColorRGB, getDescendantObjects, getDisplayedName, getID, getLevel, getMeasurementList, getMeasurements, getMetadata, getName, getParent, getUnmodifiableMetadataMap, hasChildObjects, hasChildren, hasMeasurements, hasROI, isAnnotation, isCell, isDetection, isRootObject, isTile, isTMACore, nChildObjects, nDescendants, objectCountPostfix, refreshID, removeChildObject, removeChildObjects, removePathObject, removePathObjects, resetPathClass, retrieveMetadataKeys, retrieveMetadataValue, setClassifications, setColor, setColor, setColorRGB, setID, setName, setPathClass, storeMetadataValue, toString
-
Method Details
-
setROI
Set the ROI for this object. If this is called, one should remember to update any associated hierarchy to notify it of the change.- Parameters:
roi-
-
setLocked
public void setLocked(boolean locked) Set locked flag, indicating that the object ROI should not be modified. It directly impacts onisEditable()Note that this is only a hint that other code should pay attention to - it is not enforced locally.
TODO: Consider shifting this method into PathObject rather than PathROIObject (even if it doesn't really do anything there).
- Overrides:
setLockedin classPathObject- Parameters:
locked-
-
isLocked
public boolean isLocked()Query the locked status for the object, indicating whether it should be editable or not.- Overrides:
isLockedin classPathObject- Returns:
-
isEditable
Deprecated.since v0.4.0Return true ifisLocked()is false, otherwise returns false.This method existed before
isLocked()to try to automatically determine whether an object should be locked or not. Now theisLocked()flag should be used instead.- Specified by:
isEditablein classPathObject- Returns:
-
setPathClass
Description copied from class:PathObjectSet the classification of the object, specifying a classification probability.The probability is expected to be between 0 and 1, or Double.NaN if no probability should be set.
- Specified by:
setPathClassin classPathObject
-
getClassProbability
public double getClassProbability()Description copied from class:PathObjectRequest the classification probability, or Double.NaN if no probability is available.- Specified by:
getClassProbabilityin classPathObject- Returns:
-
getPathClass
Description copied from class:PathObjectGet the classification of the object.- Specified by:
getPathClassin classPathObject- Returns:
-
getROI
Description copied from class:PathObjectGet the region of interest (ROI) for the object.- Specified by:
getROIin classPathObject- Returns:
-
writeExternal
- Specified by:
writeExternalin interfaceExternalizable- Overrides:
writeExternalin classPathObject- Throws:
IOException
-
readExternal
- Specified by:
readExternalin interfaceExternalizable- Overrides:
readExternalin classPathObject- Throws:
IOExceptionClassNotFoundException
-