Class PLIOCompress
- java.lang.Object
-
- nom.tam.fits.compression.algorithm.plio.PLIOCompress
-
- Direct Known Subclasses:
PLIOCompress.BytePLIOCompressor,PLIOCompress.IntPLIOCompressor,PLIOCompress.ShortPLIOCompressor
public abstract class PLIOCompress extends java.lang.ObjectThe 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.- Author:
- Doug Tody, William Pence, Richard van Nieuwenhoven
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classPLIOCompress.BytePLIOCompressorstatic classPLIOCompress.IntPLIOCompressorAttention int values are limited to 24 bits!static classPLIOCompress.ShortPLIOCompressor
-
Constructor Summary
Constructors Constructor Description PLIOCompress()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected voidcompress(java.nio.ShortBuffer compressedData, int npix)PL_P2L -- Convert a pixel tiledImageOperation to a line list.protected intdecompress(java.nio.ShortBuffer compressedData, int npix)PL_L2PI -- Translate a PLIO line list into an integer pixel tiledImageOperation.protected abstract intnextPixel()protected abstract voidput(int index, int pixel)
-
-
-
Method Detail
-
compress
protected void compress(java.nio.ShortBuffer compressedData, int npix)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
protected int decompress(java.nio.ShortBuffer compressedData, int npix)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)
-
-