Class PLIOCompress
java.lang.Object
nom.tam.fits.compression.algorithm.plio.PLIOCompress
- Direct Known Subclasses:
PLIOCompress.BytePLIOCompressor
,PLIOCompress.IntPLIOCompressor
,PLIOCompress.ShortPLIOCompressor
The original decompression code was written by Doug Tody, NRAO and included
(ported to c and adapted) in cfitsio by William Pence, NASA/GSFC. That code
was then ported to Java by R. van Nieuwenhoven. Later it was massively
refactored to harmonize the different compression algorithms and reduce the
duplicate code pieces without obscuring the algorithm itself as good as
possible.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic class
static class
Attention int values are limited to 24 bits!static class
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final int
private static final int
private static final int
private static final int
private static final int
private static final int
private static final int
private static final int
private static final int
private static final int
The exact meaning of this var is not clear at the moment of porting the algorithm to Java.private static final int
private static final int
private static final int
private static final int
private static final int
private static final int
private static final int
private static final int
private static final short[]
private static final int
private static final int
private static final int
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected void
compress
(ShortBuffer compressedData, int npix) PL_P2L -- Convert a pixel tiledImageOperation to a line list.protected int
decompress
(ShortBuffer compressedData, int npix) PL_L2PI -- Translate a PLIO line list into an integer pixel tiledImageOperation.protected abstract int
protected abstract void
put
(int index, int pixel)
-
Field Details
-
FIRST_VALUE_WITH_13_BIT
private static final int FIRST_VALUE_WITH_13_BIT- See Also:
-
FIRST_VALUE_WITH_14_BIT
private static final int FIRST_VALUE_WITH_14_BIT- See Also:
-
FIRST_VALUE_WITH_15_BIT
private static final int FIRST_VALUE_WITH_15_BIT- See Also:
-
FIRST_VALUE_WITH_16_BIT
private static final int FIRST_VALUE_WITH_16_BIT- See Also:
-
HEADER_SIZE_FIELD1
private static final int HEADER_SIZE_FIELD1- See Also:
-
HEADER_SIZE_FIELD2
private static final int HEADER_SIZE_FIELD2- See Also:
-
LAST_VALUE_FITTING_IN_12_BIT
private static final int LAST_VALUE_FITTING_IN_12_BIT- See Also:
-
MINI_HEADER_SIZE
private static final int MINI_HEADER_SIZE- See Also:
-
MINI_HEADER_SIZE_FIELD
private static final int MINI_HEADER_SIZE_FIELD- See Also:
-
N20481
private static final int N20481The exact meaning of this var is not clear at the moment of porting the algorithm to Java.- See Also:
-
OPCODE_1
private static final int OPCODE_1- See Also:
-
OPCODE_2
private static final int OPCODE_2- See Also:
-
OPCODE_3
private static final int OPCODE_3- See Also:
-
OPCODE_4
private static final int OPCODE_4- See Also:
-
OPCODE_5
private static final int OPCODE_5- See Also:
-
OPCODE_6
private static final int OPCODE_6- See Also:
-
OPCODE_7
private static final int OPCODE_7- See Also:
-
OPCODE_8
private static final int OPCODE_8- See Also:
-
PLIO_HEADER
private static final short[] PLIO_HEADER -
SHIFT_12_BITS
private static final int SHIFT_12_BITS- See Also:
-
SHIFT_15_BITS
private static final int SHIFT_15_BITS- See Also:
-
VALUE_OF_BIT_13_AND14_ON
private static final int VALUE_OF_BIT_13_AND14_ON- See Also:
-
-
Constructor Details
-
PLIOCompress
public PLIOCompress()
-
-
Method Details
-
compress
PL_P2L -- Convert a pixel tiledImageOperation to a line list. The length of the list is returned as the function value.- Parameters:
compressedData
- encoded line listnpix
- number of pixels to convert
-
decompress
PL_L2PI -- Translate a PLIO line list into an integer pixel tiledImageOperation. The number of pixels output (always npix) is returned as the function value.- Parameters:
compressedData
- encoded line listnpix
- number of pixels to convert- Returns:
- number of pixels converted
-
nextPixel
protected abstract int nextPixel() -
put
protected abstract void put(int index, int pixel)
-