- java.lang.Object
-
- org.scijava.AbstractContextual
-
- org.scijava.plugin.AbstractRichPlugin
-
- org.scijava.service.AbstractService
-
- io.scif.services.JAIIIOServiceImpl
-
- All Implemented Interfaces:
SCIFIOService,JAIIIOService,Comparable<org.scijava.Prioritized>,org.scijava.Contextual,org.scijava.Disposable,org.scijava.Identifiable,org.scijava.Initializable,org.scijava.Locatable,org.scijava.log.Logged,org.scijava.plugin.HasPluginInfo,org.scijava.plugin.RichPlugin,org.scijava.plugin.SciJavaPlugin,org.scijava.Prioritized,org.scijava.service.Service,org.scijava.Versioned
public class JAIIIOServiceImpl extends org.scijava.service.AbstractService implements JAIIIOService
Implementation of JAIIIOService for reading and writing JPEG-2000 data.
-
-
Constructor Summary
Constructors Constructor Description JAIIIOServiceImpl()
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description BufferedImagereadImage(InputStream in)Reads an image using JAI Image I/O using the JPEG 2000 codec.BufferedImagereadImage(InputStream in, JPEG2000CodecOptions options)Reads an image using JAI Image I/O using the JPEG 2000 codec.RasterreadRaster(InputStream in)Reads an image into a raster using JAI Image I/O using the JPEG 2000 codec.RasterreadRaster(InputStream in, JPEG2000CodecOptions options)Reads an image into a raster using JAI Image I/O using the JPEG 2000 codec.voidwriteImage(OutputStream out, BufferedImage img, boolean lossless, int[] codeBlockSize, double quality)Deprecated.use JAIIIOService#writeImage(OutputStream, BufferedImage, JPEG2000CodecOptions)voidwriteImage(OutputStream out, BufferedImage img, JPEG2000CodecOptions options)Writes an image using JAI Image I/O using the JPEG 2000 codec.-
Methods inherited from class org.scijava.service.AbstractService
getContext, setContext, toString
-
Methods inherited from class org.scijava.plugin.AbstractRichPlugin
getInfo, getPriority, setInfo, setPriority
-
Methods inherited from class org.scijava.AbstractContextual
context
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.scijava.Contextual
context, getContext, setContext
-
Methods inherited from interface org.scijava.Disposable
dispose
-
Methods inherited from interface org.scijava.plugin.HasPluginInfo
getInfo, setInfo
-
Methods inherited from interface org.scijava.Locatable
getLocation
-
Methods inherited from interface org.scijava.Prioritized
compareTo, getPriority, setPriority
-
Methods inherited from interface org.scijava.plugin.RichPlugin
getIdentifier, log
-
Methods inherited from interface org.scijava.service.Service
initialize, registerEventHandlers
-
Methods inherited from interface org.scijava.Versioned
getVersion
-
-
-
-
Method Detail
-
writeImage
public void writeImage(OutputStream out, BufferedImage img, JPEG2000CodecOptions options) throws IOException, ServiceException
Description copied from interface:JAIIIOServiceWrites an image using JAI Image I/O using the JPEG 2000 codec.- Specified by:
writeImagein interfaceJAIIIOService- Parameters:
out- Target output stream.img- Source buffered image.options- Options for the JPEG 2000 codec.- Throws:
IOException- Thrown if there is an error reading from or writing to one of the target streams / buffers.ServiceException- Thrown if there is an error initializing or interacting with the dependencies of the service.
-
writeImage
@Deprecated public void writeImage(OutputStream out, BufferedImage img, boolean lossless, int[] codeBlockSize, double quality) throws IOException, ServiceException
Deprecated.use JAIIIOService#writeImage(OutputStream, BufferedImage, JPEG2000CodecOptions)Description copied from interface:JAIIIOServiceWrites an image using JAI Image I/O using the JPEG 2000 codec.- Specified by:
writeImagein interfaceJAIIIOService- Parameters:
out- Target output stream.img- Source buffered image.lossless- Whether or not to compress losslessly.codeBlockSize- JPEG 2000 code block size.quality- JPEG 2000 quality level.- Throws:
IOException- Thrown if there is an error reading from or writing to one of the target streams / buffers.ServiceException- Thrown if there is an error initializing or interacting with the dependencies of the service.
-
readImage
public BufferedImage readImage(InputStream in, JPEG2000CodecOptions options) throws IOException, ServiceException
Description copied from interface:JAIIIOServiceReads an image using JAI Image I/O using the JPEG 2000 codec.- Specified by:
readImagein interfaceJAIIIOService- Parameters:
in- Target input stream.options- Options for the JPEG 2000 codec.- Returns:
- An AWT buffered image.
- Throws:
IOException- Thrown if there is an error reading from or writing to one of the target streams / buffers.ServiceException- Thrown if there is an error initializing or interacting with the dependencies of the service.
-
readImage
public BufferedImage readImage(InputStream in) throws IOException, ServiceException
Description copied from interface:JAIIIOServiceReads an image using JAI Image I/O using the JPEG 2000 codec.- Specified by:
readImagein interfaceJAIIIOService- Parameters:
in- Target input stream.- Returns:
- An AWT buffered image.
- Throws:
IOException- Thrown if there is an error reading from or writing to one of the target streams / buffers.ServiceException- Thrown if there is an error initializing or interacting with the dependencies of the service.- See Also:
JAIIIOService.readImage(InputStream, JPEG2000CodecOptions)
-
readRaster
public Raster readRaster(InputStream in, JPEG2000CodecOptions options) throws IOException, ServiceException
Description copied from interface:JAIIIOServiceReads an image into a raster using JAI Image I/O using the JPEG 2000 codec.- Specified by:
readRasterin interfaceJAIIIOService- Parameters:
in- Target input stream.options- Options for the JPEG 2000 codec.- Returns:
- An AWT image raster.
- Throws:
IOException- Thrown if there is an error reading from or writing to one of the target streams / buffers.ServiceException- Thrown if there is an error initializing or interacting with the dependencies of the service.
-
readRaster
public Raster readRaster(InputStream in) throws IOException, ServiceException
Description copied from interface:JAIIIOServiceReads an image into a raster using JAI Image I/O using the JPEG 2000 codec.- Specified by:
readRasterin interfaceJAIIIOService- Parameters:
in- Target input stream.- Returns:
- An AWT image raster.
- Throws:
IOException- Thrown if there is an error reading from or writing to one of the target streams / buffers.ServiceException- Thrown if there is an error initializing or interacting with the dependencies of the service.- See Also:
JAIIIOService.readRaster(InputStream, JPEG2000CodecOptions)
-
-