Class TiledImageCompressionOperation
java.lang.Object
nom.tam.image.tile.operation.AbstractTiledImageOperation<TileCompressionOperation>
nom.tam.image.compression.tile.TiledImageCompressionOperation
- All Implemented Interfaces:
ITiledImageOperation
public class TiledImageCompressionOperation
extends AbstractTiledImageOperation<TileCompressionOperation>
This class represents a complete tiledImageOperation of tileOperations
describing an image ordered from left to right and top down. the
tileOperations all have the same geometry only the tileOperations at the
right side and the bottom side can have different sizes.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final BinaryTableprivate StringZCMPTYPE name of the algorithm that was used to compressprivate ByteBufferprivate ICompressorControlprivate ICompressorControlprivate ImageNullPixelMaskprivate ICompressOptionprivate StringZQUANTIZ name of the algorithm that was used to quantize -
Constructor Summary
ConstructorsConstructorDescriptionTiledImageCompressionOperation(BinaryTable binaryTable) create a TiledImageCompressionOperation based on a compressed image data. -
Method Summary
Modifier and TypeMethodDescriptionprivate static voidaddColumnToTable(BinaryTableHDU hdu, Object column, String columnName) voidcompress(BinaryTableHDU hdu) voidforceNoLoss(int x, int y, int width, int heigth) protected BinaryTableprotected ImageNullPixelMaskprivate <T> TgetNullableColumn(Header header, Class<T> class1, String columnName) private voidprotected voidprivate voidprepareUncompressedData(Buffer buffer) preserveNulls(long nullValue, String compressionAlgorithm) preserve null values, where the value representing null is specified as a parameter.private voidprivate voidprivate voidreadBaseType(Header header) private voidreadCompressionHeaders(Header header) voidreadPrimaryHeaders(Header header) private voidreadTileAxis(Header header) setCompressAlgorithm(HeaderCard compressAlgorithmCard) private <T> ObjectsetInColumn(Object column, boolean predicate, TileCompressionOperation tileOperation, Class<T> clazz, T value) private static voidsetNullEntries(Object column, Object defaultValue) setQuantAlgorithm(HeaderCard quantAlgorithmCard) private voidprivate voidwriteHeader(Header header) Methods inherited from class AbstractTiledImageOperation
areAxesUndefined, areTileAxesUndefined, createTiles, getBaseType, getBufferSize, getImageWidth, getNAxes, getNumberOfTileOperations, getTileAxes, getTileOperation, getTileOperations, setAxes, setBaseType, setTileAxes
-
Field Details
-
compressAlgorithm
ZCMPTYPE name of the algorithm that was used to compress -
binaryTable
-
compressedWholeArea
-
compressorControl
-
gzipCompressorControl
-
quantAlgorithm
ZQUANTIZ name of the algorithm that was used to quantize -
imageOptions
-
imageNullPixelMask
-
-
Constructor Details
-
TiledImageCompressionOperation
create a TiledImageCompressionOperation based on a compressed image data.- Parameters:
binaryTable- the compressed image data.
-
-
Method Details
-
addColumnToTable
private static void addColumnToTable(BinaryTableHDU hdu, Object column, String columnName) throws FitsException - Throws:
FitsException
-
setNullEntries
-
compress
- Throws:
FitsException
-
compressOptions
-
decompress
-
forceNoLoss
public void forceNoLoss(int x, int y, int width, int heigth) -
getCompressedWholeArea
-
getCompressorControl
-
getGzipCompressorControl
-
prepareUncompressedData
- Throws:
FitsException
-
preserveNulls
preserve null values, where the value representing null is specified as a parameter. This parameter is ignored for floating point values where NaN is used as null value.- Parameters:
nullValue- the value representing null for byte/short and integer pixel valuescompressionAlgorithm- compression algorithm to use for the null pixel mask- Returns:
- the created null pixel mask
-
read
- Throws:
FitsException
-
readPrimaryHeaders
- Throws:
FitsException
-
setCompressAlgorithm
-
setQuantAlgorithm
-
getNullableColumn
private <T> T getNullableColumn(Header header, Class<T> class1, String columnName) throws FitsException - Throws:
FitsException
-
initializeCompressionControl
private void initializeCompressionControl() -
initImageOptions
private void initImageOptions() -
processAllTiles
private void processAllTiles() -
readAxis
- Throws:
FitsException
-
readBaseType
-
readCompressionHeaders
-
readTileAxis
- Throws:
FitsException
-
setInColumn
private <T> Object setInColumn(Object column, boolean predicate, TileCompressionOperation tileOperation, Class<T> clazz, T value) -
writeColumns
- Throws:
FitsException
-
writeHeader
- Throws:
FitsException
-
getBinaryTable
-
getImageNullPixelMask
-
initializeQuantAlgorithm
protected void initializeQuantAlgorithm()
-