Package nom.tam.image.compression.hdu
Class CompressedImageData
- java.lang.Object
-
- nom.tam.fits.Data
-
- nom.tam.fits.AbstractTableData
-
- nom.tam.fits.BinaryTable
-
- nom.tam.image.compression.hdu.CompressedImageData
-
- All Implemented Interfaces:
FitsElement,TableData
public class CompressedImageData extends BinaryTable
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class nom.tam.fits.BinaryTable
BinaryTable.ColumnDesc, BinaryTable.SaveState
-
-
Field Summary
-
Fields inherited from class nom.tam.fits.Data
dataSize, fileOffset, input
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedCompressedImageData()protectedCompressedImageData(Header hdr)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidcompress(CompressedImageHDU hdu)voidfillHeader(Header h)Update a FITS header to reflect the current state of the data.protected voidforceNoLoss(int x, int y, int width, int heigth)protected <T extends ICompressOption>
TgetCompressOption(java.lang.Class<T> clazz)protected java.nio.BuffergetUncompressedData(Header hdr)protected voidprepareUncompressedData(java.lang.Object data, Header header)protected voidpreserveNulls(long nullValue, java.lang.String compressionAlgorithm)preserve the null values in the image even if the compression algorithm is lossy.protected CompressedImageDatasetAxis(int[] axes)protected voidsetCompressAlgorithm(HeaderCard compressAlgorithmCard)protected voidsetQuantAlgorithm(HeaderCard quantAlgorithmCard)protected CompressedImageDatasetTileSize(int... axes)-
Methods inherited from class nom.tam.fits.BinaryTable
addByteVaryingColumn, addColumn, addFlattenedColumn, addRow, createColumnDataFor, createColumnTable, deleteColumns, deleteRows, getBases, getColumn, getData, getDimens, getElement, getFlatColumns, getFlattenedColumn, getHeapOffset, getHeapSize, getModelRow, getNCols, getNRows, getRawElement, getRow, getSizes, getTDims, getTrueSize, getTypes, read, readHeap, readTrueData, setColumn, setElement, setFlattenedColumn, setRow, updateAfterDelete, validColumn, validRow, write
-
Methods inherited from class nom.tam.fits.Data
getFileOffset, getKernel, getSize, reset, rewrite, rewriteable, setFileOffset
-
-
-
-
Constructor Detail
-
CompressedImageData
protected CompressedImageData()
-
CompressedImageData
protected CompressedImageData(Header hdr) throws FitsException
- Throws:
FitsException
-
-
Method Detail
-
fillHeader
public void fillHeader(Header h) throws FitsException
Description copied from class:BinaryTableUpdate a FITS header to reflect the current state of the data. * @throws FitsException if the operation failed- Overrides:
fillHeaderin classBinaryTable- Throws:
FitsException
-
compress
protected void compress(CompressedImageHDU hdu) throws FitsException
- Throws:
FitsException
-
forceNoLoss
protected void forceNoLoss(int x, int y, int width, int heigth)
-
getCompressOption
protected <T extends ICompressOption> T getCompressOption(java.lang.Class<T> clazz)
-
getUncompressedData
protected java.nio.Buffer getUncompressedData(Header hdr) throws FitsException
- Throws:
FitsException
-
prepareUncompressedData
protected void prepareUncompressedData(java.lang.Object data, Header header) throws FitsException- Throws:
FitsException
-
preserveNulls
protected void preserveNulls(long nullValue, java.lang.String compressionAlgorithm)preserve the null values in the image even if the compression algorithm is lossy.- Parameters:
nullValue- the value representing null for byte/short and integer pixel valuescompressionAlgorithm- compression algorithm to use for the null pixel mask
-
setAxis
protected CompressedImageData setAxis(int[] axes)
-
setCompressAlgorithm
protected void setCompressAlgorithm(HeaderCard compressAlgorithmCard)
-
setQuantAlgorithm
protected void setQuantAlgorithm(HeaderCard quantAlgorithmCard) throws FitsException
- Throws:
FitsException
-
setTileSize
protected CompressedImageData setTileSize(int... axes) throws FitsException
- Throws:
FitsException
-
-