Package loci.formats.codec
Class NikonCodec
java.lang.Object
loci.formats.codec.BaseCodec
loci.formats.codec.NikonCodec
- All Implemented Interfaces:
Codec
This class implements Nikon decompression. Compression is not yet
implemented.
Decompression logic is adapted from the jrawio project,
http://jrawio.dev.java.net
- Author:
- Melissa Linkert melissa at glencoesoftware.com
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final int[]private static final short[]private static final short[]private static final short[]private static final short[]private static final short[]private static final short[] -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbyte[]compress(byte[] data, CodecOptions options) Compresses a block of data.byte[]decompress(loci.common.RandomAccessInputStream in, CodecOptions options) The CodecOptions parameter must be an instance ofNikonCodecOptions, and should have the following fields set:losslessvPredictorcurvesplitbitsPerSamplemaxByteswidthheightMethods inherited from class loci.formats.codec.BaseCodec
compress, decompress, decompress, decompress, decompress, test
-
Field Details
-
DEFAULT_LINEARIZATION_TABLE
private static final int[] DEFAULT_LINEARIZATION_TABLE -
LOSSY_DECODER_CONFIGURATION_12
private static final short[] LOSSY_DECODER_CONFIGURATION_12 -
SPLIT_LOSSY_DECODER_CONFIGURATION_12
private static final short[] SPLIT_LOSSY_DECODER_CONFIGURATION_12 -
LOSSLESS_DECODER_CONFIGURATION_12
private static final short[] LOSSLESS_DECODER_CONFIGURATION_12 -
LOSSY_DECODER_CONFIGURATION_14
private static final short[] LOSSY_DECODER_CONFIGURATION_14 -
SPLIT_LOSSY_DECODER_CONFIGURATION_14
private static final short[] SPLIT_LOSSY_DECODER_CONFIGURATION_14 -
LOSSLESS_DECODER_CONFIGURATION_14
private static final short[] LOSSLESS_DECODER_CONFIGURATION_14
-
-
Constructor Details
-
NikonCodec
public NikonCodec()
-
-
Method Details
-
compress
Description copied from interface:CodecCompresses a block of data.- Parameters:
data- The data to be compressed.options- Options to be used during compression, if appropriate.- Returns:
- The compressed data.
- Throws:
FormatException- If input is not a compressed data block of the appropriate type.
-
decompress
public byte[] decompress(loci.common.RandomAccessInputStream in, CodecOptions options) throws FormatException, IOException The CodecOptions parameter must be an instance ofNikonCodecOptions, and should have the following fields set:losslessvPredictorcurvesplitbitsPerSamplemaxByteswidthheight- Specified by:
decompressin interfaceCodec- Specified by:
decompressin classBaseCodec- Parameters:
in- The stream from which to read compressed data.options- Options to be used during decompression.- Returns:
- The decompressed data.
- Throws:
FormatException- If data is not valid compressed data for this decompressor.IOException- See Also:
-