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 SummaryModifier and TypeMethodDescriptiondefault Collection<URI> getUris()getURIs()Get all the URIs required for this resource.default booleanupdateUris(Map<URI, URI> replacements) booleanupdateURIs(Map<URI, URI> replacements) Update the specified URIs.
- 
Method Details- 
getUris- Throws:
- IOException
 
- 
updateUris- Throws:
- IOException
 
- 
getURIsGet 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
 
- 
updateURIsUpdate 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 UnsupportedOperationExceptionif 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
 
 
-