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 Modifier and Type Field Description private TiledImageCompressionOperation
tiledImageOperation
tile information, only available during compressing or decompressing.-
Fields inherited from class nom.tam.fits.Data
dataSize, fileOffset, input
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
CompressedImageData()
protected
CompressedImageData(Header hdr)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
compress(CompressedImageHDU hdu)
void
fillHeader(Header h)
Update a FITS header to reflect the current state of the data.protected void
forceNoLoss(int x, int y, int width, int heigth)
protected <T extends ICompressOption>
TgetCompressOption(java.lang.Class<T> clazz)
protected java.nio.Buffer
getUncompressedData(Header hdr)
protected void
prepareUncompressedData(java.lang.Object data, Header header)
protected void
preserveNulls(long nullValue, java.lang.String compressionAlgorithm)
preserve the null values in the image even if the compression algorithm is lossy.protected CompressedImageData
setAxis(int[] axes)
protected void
setCompressAlgorithm(HeaderCard compressAlgorithmCard)
protected void
setQuantAlgorithm(HeaderCard quantAlgorithmCard)
protected CompressedImageData
setTileSize(int... axes)
private TiledImageCompressionOperation
tiledImageOperation()
-
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
-
-
-
-
Field Detail
-
tiledImageOperation
private TiledImageCompressionOperation tiledImageOperation
tile information, only available during compressing or decompressing.
-
-
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:BinaryTable
Update a FITS header to reflect the current state of the data. * @throws FitsException if the operation failed- Overrides:
fillHeader
in classBinaryTable
- Parameters:
h
- header to fill with the data from the current data object- Throws:
FitsException
- if the operation fails
-
tiledImageOperation
private TiledImageCompressionOperation tiledImageOperation()
-
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
-
-