Package qupath.lib.images.servers
Class ImageServerBuilder.UriImageSupport<T>
java.lang.Object
qupath.lib.images.servers.ImageServerBuilder.UriImageSupport<T>
- Type Parameters:
T
-
- Enclosing interface:
ImageServerBuilder<T>
Helper class to summarize which ImageServers can be build by a particular
ImageServerBuilder
for a given URI, and a level of confidence.
This may be used to select which ImageServerBuilder
is used to open the image(s).-
Method Summary
Modifier and TypeMethodDescriptionstatic <T> ImageServerBuilder.UriImageSupport
<T> createInstance
(Class<? extends ImageServerBuilder<T>> providerClass, float supportLevel, Collection<ImageServerBuilder.ServerBuilder<T>> builders) Create aImageServerBuilder.UriImageSupport
for (possibly multiple) images that can be read from a single URI.static <T> ImageServerBuilder.UriImageSupport
<T> createInstance
(Class<? extends ImageServerBuilder<T>> providerClass, float supportLevel, ImageServerBuilder.ServerBuilder<T> builder) Create aImageServerBuilder.UriImageSupport
for a single image that can be read from a single URI.Get a list of ServerBuilders, one for each image that can be read based on the specified URI.Class
<? extends ImageServerBuilder<T>> Get the class of the associatedImageServerBuilder
.float
Estimated 'support level' for a given file path, where support level is a summary of the likelihood that pixel values and metadata will be returned correctly and in a way that achieves good performance.toString()
-
Method Details
-
toString
-
createInstance
public static <T> ImageServerBuilder.UriImageSupport<T> createInstance(Class<? extends ImageServerBuilder<T>> providerClass, float supportLevel, Collection<ImageServerBuilder.ServerBuilder<T>> builders) Create aImageServerBuilder.UriImageSupport
for (possibly multiple) images that can be read from a single URI.- Type Parameters:
T
-- Parameters:
providerClass
-supportLevel
-builders
-- Returns:
-
createInstance
public static <T> ImageServerBuilder.UriImageSupport<T> createInstance(Class<? extends ImageServerBuilder<T>> providerClass, float supportLevel, ImageServerBuilder.ServerBuilder<T> builder) Create aImageServerBuilder.UriImageSupport
for a single image that can be read from a single URI.- Type Parameters:
T
-- Parameters:
providerClass
-supportLevel
-builder
-- Returns:
-
getProviderClass
Get the class of the associatedImageServerBuilder
.- Returns:
-
getBuilders
Get a list of ServerBuilders, one for each image that can be read based on the specified URI. For a 'simple' file that contains a single image, a singleton list should be returned.- Returns:
-
getSupportLevel
public float getSupportLevel()Estimated 'support level' for a given file path, where support level is a summary of the likelihood that pixel values and metadata will be returned correctly and in a way that achieves good performance.The support level should be a value between 0 and 4. The following is a guide to its interpretation:
- 4 - 'ideal' support, e.g. the image was written by the library behind the ImageServer
- 3 - good support
- 2 - unknown support, i.e. worth a try
- 1 - partial/poor support, i.e. there are known limitations and all higher-scoring possibilities should be tried first
- 0 - no support
In practice, this is used to rank potential builders so that the 'best' ones are tried first for new image paths, and those with 0 support may be ignored.
- Returns:
-