Modifier and Type | Field and Description |
---|---|
private JPEGXRService |
service |
Constructor and Description |
---|
JPEGXRCodec() |
Modifier and Type | Method and Description |
---|---|
byte[] |
compress(byte[] data,
CodecOptions options)
Compresses a block of data.
|
byte[] |
decompress(byte[] buf,
CodecOptions options)
The CodecOptions parameter should have the following fields set:
maxBytes
interleaved
bitsPerSample
littleEndian
width
height |
byte[] |
decompress(loci.common.RandomAccessInputStream in,
CodecOptions options)
Decompresses data from the given RandomAccessInputStream.
|
private void |
initialize()
Initializes the JPEG-XR dependency service.
|
compress, decompress, decompress, decompress, test
private JPEGXRService service
public byte[] compress(byte[] data, CodecOptions options) throws FormatException
Codec
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.public byte[] decompress(loci.common.RandomAccessInputStream in, CodecOptions options) throws FormatException, java.io.IOException
Codec
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.java.io.IOException
public byte[] decompress(byte[] buf, CodecOptions options) throws FormatException
maxBytes
interleaved
bitsPerSample
littleEndian
width
height
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
decompress(loci.common.RandomAccessInputStream, loci.formats.codec.CodecOptions)
method to avoid having the
constructor's method definition contain a checked exception.FormatException
- If there is an error initializing JPEG-XR
services.Copyright © 2020 Open Microscopy Environment