Class PathROIObject
- All Implemented Interfaces:
Externalizable,Serializable,MinimalMetadataStore
- Direct Known Subclasses:
PathAnnotationObject,PathDetectionObject,TMACoreObject
In practice, this is almost all PathObjects (with the notable exception of PathRootObjects).
- 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, clearChildObjects, clearMetadataMap, createEmptyMeasurementList, getChildObjects, getChildObjects, getChildObjectsAsArray, getClassification, getClassifications, getColor, getDescendantObjects, getDisplayedName, getID, getLevel, getMeasurementList, getMeasurements, getMetadata, getName, getParent, getUnmodifiableMetadataMap, hasChildObjects, hasMeasurements, hasMetadata, hasROI, isAnnotation, isCell, isDetection, isRootObject, isTile, isTMACore, nChildObjects, nDescendants, objectCountPostfix, refreshID, removeChildObject, removeChildObjects, resetPathClass, retrieveMetadataKeys, retrieveMetadataValue, setClassification, setClassification, setClassifications, setColor, setColor, 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- Parameters:
pathClass-classProbability-- See Also:
-
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.The
PathClassobject is used as the internal representation of the object's classification, encapsulating both the different string components of the classification and the color used for display.For convenience,
PathObject.getClassification()andPathObject.getClassifications()provide a simpler way to interact with classifications as one or more strings.- Specified by:
getPathClassin classPathObject- Returns:
- See Also:
-
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
-