Class OMEZarrWriter
Use a OMEZarrWriter.Builder to create an instance of this class.
This class is not thread-safe but uses concurrency internally to write tiles.
See PyramidalOMEZarrWriter for a more memory friendly Zarr writer.
-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptionGet the image server used internally by this writer to read the tiles.voidWrite the entire image.voidwriteTile(TileRequest tileRequest) Write the provided tile.
-
Method Details
-
writeImage
Write the entire image.The image will be written from an internal pool of thread and this function will wait for every writing to complete, so it might take some time depending on the size of the image. The operation can be interrupted.
- Throws:
InterruptedException- if the calling thread is interrupted
-
writeTile
Write the provided tile. This might take some time depending on the size of the tile and the speed of reading the input image and writing the output image.Note that the image server used internally by this writer may not be the one given in
Builder(ImageServer). Therefore, theTileRequestManagerof the internal image server may be different from the one of the provided image server, so functions likeTileRequestManager.getAllTileRequests()may not return the expected tiles. Use theTileRequestManagerofgetReaderServer()to get accurate tiles.- Parameters:
tileRequest- the tile to write- Throws:
Exception- if an exception occurs while writing the tile
-
getReaderServer
Get the image server used internally by this writer to read the tiles. It can be different from the one given inBuilder(ImageServer).This function can be useful to get information like the tiles used by this server (for example when using the
writeTile(TileRequest)function).- Returns:
- the image server used internally by this writer to read the tiles
-