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
  • Method Details

    • checkImageSupport

      ImageServerBuilder.UriImageSupport<T> checkImageSupport(URI uri, String... args) throws IOException
      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

      ImageServer<T> buildServer(URI uri, String... args) throws Exception
      Attempt to create ImageServer<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

      Class<T> getImageType()
      Returns the base class for the images supported by this server. Typically this is BufferedImage.class.
      Returns:
    • matchClassName

      default boolean matchClassName(String... classNames)
      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