Modifier and Type | Field and Description |
---|---|
private JAIIIOService |
service |
Constructor and Description |
---|
JPEG2000Codec() |
Modifier and Type | Method and Description |
---|---|
byte[] |
compress(byte[] data,
CodecOptions options)
The CodecOptions parameter should have the following fields set:
width
height
bitsPerSample
channels
interleaved
littleEndian
lossless |
byte[] |
decompress(byte[] buf,
CodecOptions options)
The CodecOptions parameter should have the following fields set:
interleaved
littleEndian |
byte[] |
decompress(loci.common.RandomAccessInputStream in,
CodecOptions options)
The CodecOptions parameter should have the following fields set:
interleaved
littleEndian |
private void |
initialize()
Initializes the JAI ImageIO dependency service.
|
compress, decompress, decompress, decompress, test
private JAIIIOService service
public byte[] compress(byte[] data, CodecOptions options) throws FormatException
width
height
bitsPerSample
channels
interleaved
littleEndian
lossless
data
- The data to be compressed.options
- Options to be used during compression, if appropriate.FormatException
- If input is not a compressed data block of the
appropriate type.Codec.compress(byte[], CodecOptions)
public byte[] decompress(loci.common.RandomAccessInputStream in, CodecOptions options) throws FormatException, IOException
interleaved
littleEndian
decompress
in interface Codec
decompress
in class BaseCodec
in
- The stream from which to read compressed data.options
- Options to be used during decompression.FormatException
- If data is not valid compressed data for this
decompressor.IOException
Codec.decompress(RandomAccessInputStream, CodecOptions)
public byte[] decompress(byte[] buf, CodecOptions options) throws FormatException
interleaved
littleEndian
decompress
in interface Codec
decompress
in class BaseCodec
buf
- the data to be decompressedoptions
- Options to be used during decompression.FormatException
- If data is not valid.Codec.decompress(byte[], CodecOptions)
private void initialize() throws FormatException
compress(byte[], loci.formats.codec.CodecOptions)
and decompress(loci.common.RandomAccessInputStream, loci.formats.codec.CodecOptions)
methods to
avoid having the constructor's method definition contain a checked
exception.FormatException
- If there is an error initializing JAI ImageIO
services.Copyright © 2017 Open Microscopy Environment