Package qupath.lib.io
Interface UriResource
- All Known Subinterfaces:
ImageDataOp
,ImageOp
,ProjectImageEntry<T>
- All Known Implementing Classes:
DnnObjectClassifier
,ImageOps.PaddedOp
,OpenCVDnn
,OpenCVModelObjectClassifier
public interface UriResource
Interface for objects that depend upon URIs.
Examples include images, where the URI refer to the image file or URL, or prediction models.
-
Method Summary
Modifier and TypeMethodDescriptiondefault Collection
<URI> getUris()
getURIs()
Get all the URIs required for this resource.default boolean
updateUris
(Map<URI, URI> replacements) boolean
updateURIs
(Map<URI, URI> replacements) Update the specified URIs.
-
Method Details
-
getUris
- Throws:
IOException
-
updateUris
- Throws:
IOException
-
getURIs
Get all the URIs required for this resource. This is often an empty or singleton list.- Returns:
- the required URIs
- Throws:
IOException
- Since:
- v0.4.0
-
updateURIs
Update the specified URIs.Warning! This should be used sparingly, particularly for objects that are otherwise immutable. It is intended only for correcting paths that have become invalid (e.g. because of files being relocated or transferred between computers) before first use of the object. It should not be used to manipulate an object after construction. Indeed, some implementations may throw an
UnsupportedOperationException
if called too late.- Parameters:
replacements
- replacement map, where the key gives the current URI and the value gives its replacement.- Returns:
- true if URIs were changed, false otherwise
- Throws:
IOException
- Since:
- v0.4.0
-