Package qupath.lib.images.writers.ome
Class OMETiffWriter
java.lang.Object
qupath.lib.images.writers.ome.OMETiffWriter
- All Implemented Interfaces:
ImageWriter<BufferedImage>
ImageWriter
for writing OME-TIFF images. For greater control, see OMEPyramidWriter
.- Author:
- Pete Bankhead
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionGet 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.boolean
supportsImageType
(ImageServer<BufferedImage> server) Test whether images provided by a specified ImageServer can be successfully written.boolean
Returns true if the writer is capable of storing pixel size information.boolean
Returns true if the writer is capable of writing pyramidal images.boolean
Check if writer can handle RGB (it probably can...).boolean
Check if writer can handle multiple timepoints.boolean
Check if writer can handle multiple z-slices.void
writeImage
(BufferedImage img, OutputStream stream) Write a full image to a specified output stream.void
writeImage
(BufferedImage img, String pathOutput) Write a full image to a specified path.void
writeImage
(ImageServer<BufferedImage> server, OutputStream stream) Write OME-TIFF image to an output stream.void
writeImage
(ImageServer<BufferedImage> server, String pathOutput) Write a full image to a specified path.void
writeImage
(ImageServer<BufferedImage> server, RegionRequest region, OutputStream stream) Write OME-TIFF image to an output stream.void
writeImage
(ImageServer<BufferedImage> server, RegionRequest region, String pathOutput) Write an image region to a specified path.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface qupath.lib.images.writers.ImageWriter
getDefaultExtension
-
Constructor Details
-
OMETiffWriter
public OMETiffWriter()
-
-
Method Details
-
getName
Description copied from interface:ImageWriter
Get the name of the image writer.- Specified by:
getName
in interfaceImageWriter<BufferedImage>
- Returns:
-
getExtensions
Description copied from interface:ImageWriter
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;- Specified by:
getExtensions
in interfaceImageWriter<BufferedImage>
- Returns:
-
supportsT
public boolean supportsT()Description copied from interface:ImageWriter
Check if writer can handle multiple timepoints.- Specified by:
supportsT
in interfaceImageWriter<BufferedImage>
- Returns:
-
supportsZ
public boolean supportsZ()Description copied from interface:ImageWriter
Check if writer can handle multiple z-slices.- Specified by:
supportsZ
in interfaceImageWriter<BufferedImage>
- Returns:
-
supportsRGB
public boolean supportsRGB()Description copied from interface:ImageWriter
Check if writer can handle RGB (it probably can...).- Specified by:
supportsRGB
in interfaceImageWriter<BufferedImage>
- Returns:
-
supportsImageType
Description copied from interface:ImageWriter
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.
- Specified by:
supportsImageType
in interfaceImageWriter<BufferedImage>
- Parameters:
server
-- Returns:
-
supportsPyramidal
public boolean supportsPyramidal()Description copied from interface:ImageWriter
Returns true if the writer is capable of writing pyramidal images.- Specified by:
supportsPyramidal
in interfaceImageWriter<BufferedImage>
- Returns:
-
supportsPixelSize
public boolean supportsPixelSize()Description copied from interface:ImageWriter
Returns true if the writer is capable of storing pixel size information.- Specified by:
supportsPixelSize
in interfaceImageWriter<BufferedImage>
- Returns:
-
getDetails
Description copied from interface:ImageWriter
Get further details of the writer, which may be displayed to a user.- Specified by:
getDetails
in interfaceImageWriter<BufferedImage>
- Returns:
-
getImageClass
Description copied from interface:ImageWriter
Get the class of supported images.- Specified by:
getImageClass
in interfaceImageWriter<BufferedImage>
- Returns:
ImageServer.getImageClass()
-
writeImage
public void writeImage(ImageServer<BufferedImage> server, RegionRequest region, String pathOutput) throws IOException Description copied from interface:ImageWriter
Write an image region to a specified path.- Specified by:
writeImage
in interfaceImageWriter<BufferedImage>
- Parameters:
server
-region
-pathOutput
-- Throws:
IOException
-
writeImage
Description copied from interface:ImageWriter
Write a full image to a specified path.- Specified by:
writeImage
in interfaceImageWriter<BufferedImage>
- Parameters:
img
-pathOutput
-- Throws:
IOException
-
writeImage
Description copied from interface:ImageWriter
Write a full image to a specified path.- Specified by:
writeImage
in interfaceImageWriter<BufferedImage>
- Parameters:
server
-pathOutput
-- Throws:
IOException
-
writeImage
public void writeImage(ImageServer<BufferedImage> server, RegionRequest region, OutputStream stream) throws IOException Write OME-TIFF image to an output stream. Note that this must be able to write the image in-memory first, and therefore is not suitable for very large images.- Specified by:
writeImage
in interfaceImageWriter<BufferedImage>
- Parameters:
server
-region
-stream
-- Throws:
IOException
-
writeImage
Description copied from interface:ImageWriter
Write a full image to a specified output stream.- Specified by:
writeImage
in interfaceImageWriter<BufferedImage>
- Parameters:
img
-stream
-- Throws:
IOException
-
writeImage
Write OME-TIFF image to an output stream. Note that this must be able to write the image in-memory first, and therefore is not suitable for very large images.- Specified by:
writeImage
in interfaceImageWriter<BufferedImage>
- Parameters:
server
-stream
-- Throws:
IOException
-