public class JAIIIOServiceImpl extends loci.common.services.AbstractService implements JAIIIOService
Modifier and Type | Field and Description |
---|---|
static String |
NO_J2K_MSG |
private IIORegistry |
serviceRegistry |
Constructor and Description |
---|
JAIIIOServiceImpl()
Default constructor.
|
Modifier and Type | Method and Description |
---|---|
private J2KImageReader |
getReader()
Set up the JPEG-2000 image reader.
|
BufferedImage |
readImage(InputStream in)
Reads an image using JAI Image I/O using the JPEG 2000 codec.
|
BufferedImage |
readImage(InputStream in,
JPEG2000CodecOptions options)
Reads an image using JAI Image I/O using the JPEG 2000 codec.
|
Raster |
readRaster(InputStream in)
Reads an image into a raster using JAI Image I/O using the JPEG 2000 codec.
|
Raster |
readRaster(InputStream in,
JPEG2000CodecOptions options)
Reads an image into a raster using JAI Image I/O using the JPEG 2000 codec.
|
private static IIORegistry |
registerServiceProviders()
Register the JPEG-2000 readers with the reader service.
|
void |
writeImage(OutputStream out,
BufferedImage img,
JPEG2000CodecOptions options)
Writes an image using JAI Image I/O using the JPEG 2000 codec.
|
public static final String NO_J2K_MSG
private IIORegistry serviceRegistry
public void writeImage(OutputStream out, BufferedImage img, JPEG2000CodecOptions options) throws IOException, loci.common.services.ServiceException
JAIIIOService
writeImage
in interface JAIIIOService
out
- Target output stream.img
- Source buffered image.options
- Options for the JPEG 2000 codec.IOException
- Thrown if there is an error reading from or writing
to one of the target streams / buffers.loci.common.services.ServiceException
- Thrown if there is an error initializing or
interacting with the dependencies of the service.public BufferedImage readImage(InputStream in, JPEG2000CodecOptions options) throws IOException, loci.common.services.ServiceException
JAIIIOService
readImage
in interface JAIIIOService
in
- Target input stream.options
- Options for the JPEG 2000 codec.IOException
- Thrown if there is an error reading from or writing
to one of the target streams / buffers.loci.common.services.ServiceException
- Thrown if there is an error initializing or
interacting with the dependencies of the service.public BufferedImage readImage(InputStream in) throws IOException, loci.common.services.ServiceException
JAIIIOService
readImage
in interface JAIIIOService
in
- Target input stream.IOException
- Thrown if there is an error reading from or writing
to one of the target streams / buffers.loci.common.services.ServiceException
- Thrown if there is an error initializing or
interacting with the dependencies of the service.JAIIIOService.readImage(InputStream, JPEG2000CodecOptions)
public Raster readRaster(InputStream in, JPEG2000CodecOptions options) throws IOException, loci.common.services.ServiceException
JAIIIOService
readRaster
in interface JAIIIOService
in
- Target input stream.options
- Options for the JPEG 2000 codec.IOException
- Thrown if there is an error reading from or writing
to one of the target streams / buffers.loci.common.services.ServiceException
- Thrown if there is an error initializing or
interacting with the dependencies of the service.public Raster readRaster(InputStream in) throws IOException, loci.common.services.ServiceException
JAIIIOService
readRaster
in interface JAIIIOService
in
- Target input stream.IOException
- Thrown if there is an error reading from or writing
to one of the target streams / buffers.loci.common.services.ServiceException
- Thrown if there is an error initializing or
interacting with the dependencies of the service.JAIIIOService.readRaster(InputStream, JPEG2000CodecOptions)
private J2KImageReader getReader()
private static IIORegistry registerServiceProviders()
Copyright © 2017 Open Microscopy Environment