Package qupath.lib.projects
Interface ProjectImageEntry<T>
- Type Parameters:
- T- Depends upon the project used; typically BufferedImage for QuPath
- All Superinterfaces:
- MinimalMetadataStore,- UriResource
Class to represent an image entry within a project.
 
This stores the path to the image, and some optional metadata.
- 
Method SummaryModifier and TypeMethodDescriptiondefault voidDeprecated.default booleancontainsMetadata(String key) Deprecated.v0.6.0, useMinimalMetadataStore.getMetadata()instead to directly access the metadata.Get a description; this is free text describing the image.Get a path to the data for this image entry, or null if this entry is not stored on the local file system.getID()Get a unique ID to represent this entry.Get a name that may be used for this entry.Access additional images associated with the project entry, e.g.default Collection<String> Deprecated.v0.6.0, useMinimalMetadataStore.getMetadata()instead to directly access the metadata.Deprecated.v0.6.0, useMinimalMetadataStore.getMetadata()instead to directly access the metadata.default StringGet a formatted string representation of the metadata map's contents.default StringgetMetadataValue(String key) Deprecated.v0.6.0, useMinimalMetadataStore.getMetadata()instead to directly access the metadata.Get the original image name, without any randomization.Get aImageServerBuilder.ServerBuilderthat can be used to open this image.Get a summary string representing this image entry.getTags()Returns a modifiable set containing tag values.Request a thumbnail for the image.booleanCheck if this entry has savedImageDataalready available.default StringputMetadataValue(String key, String value) Deprecated.v0.6.0, useMinimalMetadataStore.getMetadata()instead to directly access the metadata.Read thePathObjectHierarchyfor this entry, or return an empty hierarchy if none is available.Read theImageDataassociated with this entry, or create a new ImageData if none is currently present.default StringDeprecated.v0.6.0, useMinimalMetadataStore.getMetadata()instead to directly access the metadata.voidsaveImageData(ImageData<T> imageData) Save theImageDatafor this entry using the default storage location for the project.voidsetDescription(String description) Set the description.voidsetImageName(String name) Set the image name for this project entry.voidsetThumbnail(T img) Set a thumbnail for the image.Methods inherited from interface qupath.lib.interfaces.MinimalMetadataStoregetMetadataMethods inherited from interface qupath.lib.io.UriResourcegetUris, getURIs, updateUris, updateURIs
- 
Method Details- 
getIDString getID()Get a unique ID to represent this entry.- Returns:
 
- 
setImageNameSet the image name for this project entry.- Parameters:
- name-
 
- 
getImageNameString getImageName()Get a name that may be used for this entry.This may be derived automatically from the server path, or set explicitly to be something else. It may also be randomized to support blinded analysis. - Returns:
- See Also:
 
- 
getOriginalImageNameString getOriginalImageName()Get the original image name, without any randomization. Most UI elements should prefergetImageName()to ensure that the randomization does its job.- Returns:
 
- 
getEntryPathPath getEntryPath()Get a path to the data for this image entry, or null if this entry is not stored on the local file system.If not null, the path may be a file or a directory and is not guaranteed to exist. Rather, it represents where the data for this entry either is or would be stored. - Returns:
 
- 
removeMetadataValueDeprecated.v0.6.0, useMinimalMetadataStore.getMetadata()instead to directly access the metadata.Remove a metadata value.- Parameters:
- key-
- Returns:
 
- 
getMetadataValueDeprecated.v0.6.0, useMinimalMetadataStore.getMetadata()instead to directly access the metadata.Request a metadata value.Note that this may return null.- Parameters:
- key-
- Returns:
 
- 
putMetadataValueDeprecated.v0.6.0, useMinimalMetadataStore.getMetadata()instead to directly access the metadata.Store a metadata value.This is intended as storage of short key-value pairs. Extended text should be stored under setDescription.- Parameters:
- key-
- value-
- Returns:
 
- 
containsMetadataDeprecated.v0.6.0, useMinimalMetadataStore.getMetadata()instead to directly access the metadata.Check if a metadata value is present for a specified key.- Parameters:
- key-
- Returns:
- trueif- getDescription()does not return null or an empty string,- falseotherwise.
 
- 
getDescriptionString getDescription()Get a description; this is free text describing the image.- Returns:
 
- 
setDescriptionSet the description.- Parameters:
- description-
- See Also:
 
- 
clearMetadataDeprecated.v0.6.0, useMinimalMetadataStore.getMetadata()instead to directly access the metadata.Remove all metadata.
- 
getMetadataMapDeprecated.v0.6.0, useMinimalMetadataStore.getMetadata()instead to directly access the metadata.Get an unmodifiable view of the underlying metadata map.- Returns:
 
- 
getMetadataKeysDeprecated.v0.6.0, useMinimalMetadataStore.getMetadata()instead to directly access the metadata.Get an unmodifiable collection of the metadata map's keys.- Returns:
 
- 
getServerBuilderImageServerBuilder.ServerBuilder<T> getServerBuilder()Get aImageServerBuilder.ServerBuilderthat can be used to open this image.- Returns:
 
- 
readImageDataRead theImageDataassociated with this entry, or create a new ImageData if none is currently present.If the full data is not needed, but rather only the objects readHierarchy()can be much faster.- Returns:
- Throws:
- IOException
- See Also:
 
- 
saveImageDataSave theImageDatafor this entry using the default storage location for the project.- Parameters:
- imageData-
- Throws:
- IOException
 
- 
readHierarchyRead thePathObjectHierarchyfor this entry, or return an empty hierarchy if none is available.- Returns:
- Throws:
- IOException
- See Also:
 
- 
hasImageDataboolean hasImageData()Check if this entry has savedImageDataalready available.- Returns:
 
- 
getSummaryString getSummary()Get a summary string representing this image entry.- Returns:
 
- 
getThumbnailRequest a thumbnail for the image.- Returns:
- a thumbnail if one has already been set, otherwise null.
- Throws:
- IOException
 
- 
setThumbnailSet a thumbnail for the image. This will replace any existing thumbnail.- Parameters:
- img-
- Throws:
- IOException
 
- 
getMetadataSummaryStringGet a formatted string representation of the metadata map's contents.- Returns:
 
- 
getImagesResourceManager.Manager<ImageServer<T>> getImages()Access additional images associated with the project entry, e.g. pixel classifications or aligned slides.- Returns:
 
- 
getTagsReturns a modifiable set containing tag values.The returned set may or may not be thread-safe. Implementing classes must document the thread-safeness of the set. - Returns:
- the set of tags of this entry
 
 
- 
MinimalMetadataStore.getMetadata()instead to directly access the metadata.