Package qupath.lib.images.servers
Interface ImageServerBuilder<T>
- Type Parameters:
T
-
- All Known Implementing Classes:
BioFormatsServerBuilder
,ImageJServerBuilder
,JsonImageServerBuilder
,OpenslideServerBuilder
public interface ImageServerBuilder<T>
Helper class for creating ImageServers from a given URI and optional argument list.
- Author:
- Pete Bankhead
-
Nested Class Summary
Modifier and TypeInterfaceDescriptionstatic class
Abstract ServerBuilder implementation that handles metadata.static class
DefaultImageServerBuilder.ServerBuilder
that requires a URI and (optional) array of String arguments to create anImageServer
with the help of aImageServerBuilder
.static interface
Interface that defines a class encapsulating all that is required to build an ImageServer.static class
Helper class to summarize which ImageServers can be build by a particularImageServerBuilder
for a given URI, and a level of confidence. -
Method Summary
Modifier and TypeMethodDescriptionbuildServer
(URI uri, String... args) Attempt to createImageServer<T>
from the specified path.checkImageSupport
(URI uri, String... args) Check whether a URI is supported by this builder.Get a short, human-readable description for display in a GUI.Returns the base class for the images supported by this server.getName()
Get a human-readable name for the kind of ImageServer this builds.default boolean
matchClassName
(String... classNames) Check if this provider matches one or more specified classnames.
-
Method Details
-
checkImageSupport
Check whether a URI is supported by this builder.This can be used to gain an estimate of how well the format is supported, and the number of images found.
- Parameters:
uri
-args
- optional String args (may be ignored)- Returns:
- Throws:
IOException
-
buildServer
Attempt to createImageServer<T>
from the specified path.- Parameters:
uri
-args
- optional String arguments that may be used by the builder.- Returns:
- Throws:
Exception
-
getName
String getName()Get a human-readable name for the kind of ImageServer this builds.- Returns:
-
getDescription
String getDescription()Get a short, human-readable description for display in a GUI.- Returns:
-
getImageType
Returns the base class for the images supported by this server. Typically this is BufferedImage.class.- Returns:
-
matchClassName
Check if this provider matches one or more specified classnames.The default implementation checks the full and simple name of the class. Subclasses may override this behavior to support more intuitive names, e.g. "bioformats", "openslide", "imagej", "imageio". However, this should not be overused, so as to prevent future conflicts.
- Parameters:
classNames
-- Returns:
- true if there is any classname match, false otherwise
-