Package qupath.lib.images.writers
Interface ImageWriter<T>
- Type Parameters:
- T-
- All Known Implementing Classes:
- JpegWriter,- OMETiffWriter,- OMEZarrImageWriter,- 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).
- 
Method SummaryModifier and TypeMethodDescriptiondefault StringGet the default extension.Get further details of the writer, which may be displayed to a user.Get the file extensions used by the image writer.Get the class of supported images.getName()Get the name of the image writer.booleansupportsImageType(ImageServer<T> server) Test whether images provided by a specified ImageServer can be successfully written.booleanReturns true if the writer is capable of storing pixel size information.booleanReturns true if the writer is capable of writing pyramidal images.booleanCheck if writer can handle RGB (it probably can...).booleanCheck if writer can handle multiple timepoints.booleanCheck if writer can handle multiple z-slices.voidwriteImage(ImageServer<T> server, OutputStream stream) Write a full image to a specified output stream.voidwriteImage(ImageServer<T> server, String pathOutput) Write a full image to a specified path.voidwriteImage(ImageServer<T> server, RegionRequest region, OutputStream stream) Write an image region to a specified output stream.voidwriteImage(ImageServer<T> server, RegionRequest region, String pathOutput) Write an image region to a specified path.voidwriteImage(T img, OutputStream stream) Write a full image to a specified output stream.voidwriteImage(T img, String pathOutput) Write a full image to a specified path.
- 
Method Details- 
getNameString getName()Get the name of the image writer.- Returns:
 
- 
getExtensionsCollection<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:
 
- 
getDefaultExtensionGet the default extension. This should be the first returned bygetExtensions().- Returns:
 
- 
supportsTboolean supportsT()Check if writer can handle multiple timepoints.- Returns:
 
- 
supportsZboolean supportsZ()Check if writer can handle multiple z-slices.- Returns:
 
- 
supportsRGBboolean supportsRGB()Check if writer can handle RGB (it probably can...).- Returns:
 
- 
supportsImageTypeTest 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:
 
- 
supportsPyramidalboolean supportsPyramidal()Returns true if the writer is capable of writing pyramidal images.- Returns:
 
- 
supportsPixelSizeboolean supportsPixelSize()Returns true if the writer is capable of storing pixel size information.- Returns:
 
- 
getDetailsString getDetails()Get further details of the writer, which may be displayed to a user.- Returns:
 
- 
getImageClassGet the class of supported images.- Returns:
- ImageServer.getImageClass()
 
- 
writeImageWrite an image region to a specified path.- Parameters:
- server-
- region-
- pathOutput-
- Throws:
- IOException
 
- 
writeImageWrite a full image to a specified path.- Parameters:
- img-
- pathOutput-
- Throws:
- IOException
 
- 
writeImageWrite a full image to a specified path.- Parameters:
- server-
- pathOutput-
- Throws:
- IOException
 
- 
writeImagevoid 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
 
- 
writeImageWrite a full image to a specified output stream.- Parameters:
- img-
- stream-
- Throws:
- IOException
 
- 
writeImageWrite a full image to a specified output stream.- Parameters:
- server-
- stream-
- Throws:
- IOException
 
 
-