Interface ImageWriter<T>

Type Parameters:
T -
All Known Implementing Classes:
JpegWriter, OMETiffWriter, PngWriter, TiffWriterIJ, ZipWriterIJ

public interface ImageWriter<T>
Interface for defining class that can write images.

This may not have been a particularly good idea and may change in the future... (e.g. using services?).

As it is, it's best to avoid using it because the design is rather clumsy (and goes back to a day whenever external dependencies were avoided with an enthusiasm that may have been a bit too much).

Author:
Pete Bankhead
  • Method Details

    • getName

      String getName()
      Get the name of the image writer.
      Returns:
    • getExtensions

      Collection<String> getExtensions()
      Get the file extensions used by the image writer. These are returned without the leading 'dot'. In the case where multiple extensions are associated with a file type (e.g. "jpg", "jpeg", "tif", "tiff") the preferred should be returned first;
      Returns:
    • getDefaultExtension

      default String getDefaultExtension()
      Get the default extension. This should be the first returned by getExtensions().
      Returns:
    • supportsT

      boolean supportsT()
      Check if writer can handle multiple timepoints.
      Returns:
    • supportsZ

      boolean supportsZ()
      Check if writer can handle multiple z-slices.
      Returns:
    • supportsRGB

      boolean supportsRGB()
      Check if writer can handle RGB (it probably can...).
      Returns:
    • supportsImageType

      boolean supportsImageType(ImageServer<T> server)
      Test whether images provided by a specified ImageServer can be successfully written.

      Reasons why it might not be are the number of channels and/or bit-depth.

      Parameters:
      server -
      Returns:
    • supportsPyramidal

      boolean supportsPyramidal()
      Returns true if the writer is capable of writing pyramidal images.
      Returns:
    • supportsPixelSize

      boolean supportsPixelSize()
      Returns true if the writer is capable of storing pixel size information.
      Returns:
    • getDetails

      String getDetails()
      Get further details of the writer, which may be displayed to a user.
      Returns:
    • getImageClass

      Class<T> getImageClass()
      Get the class of supported images.
      Returns:
      ImageServer.getImageClass()
    • writeImage

      void writeImage(ImageServer<T> server, RegionRequest region, String pathOutput) throws IOException
      Write an image region to a specified path.
      Parameters:
      server -
      region -
      pathOutput -
      Throws:
      IOException
    • writeImage

      void writeImage(T img, String pathOutput) throws IOException
      Write a full image to a specified path.
      Parameters:
      img -
      pathOutput -
      Throws:
      IOException
    • writeImage

      void writeImage(ImageServer<T> server, String pathOutput) throws IOException
      Write a full image to a specified path.
      Parameters:
      server -
      pathOutput -
      Throws:
      IOException
    • writeImage

      void writeImage(ImageServer<T> server, RegionRequest region, OutputStream stream) throws IOException
      Write an image region to a specified output stream.
      Parameters:
      server -
      region -
      stream -
      Throws:
      IOException
    • writeImage

      void writeImage(T img, OutputStream stream) throws IOException
      Write a full image to a specified output stream.
      Parameters:
      img -
      stream -
      Throws:
      IOException
    • writeImage

      void writeImage(ImageServer<T> server, OutputStream stream) throws IOException
      Write a full image to a specified output stream.
      Parameters:
      server -
      stream -
      Throws:
      IOException