Package nom.tam.image.compression.tile
Class TileCompressionOperation
- java.lang.Object
-
- nom.tam.image.tile.operation.AbstractTileOperation
-
- nom.tam.image.compression.tile.TileCompressionOperation
-
- All Implemented Interfaces:
java.lang.Runnable,ITileOperation
- Direct Known Subclasses:
TileCompressor,TileDecompressor
abstract class TileCompressionOperation extends AbstractTileOperation implements ITileOperation
abstract information holder about the a tile that represents a rectangular part of the image. Will be sub classed for compression and decompression variants.
-
-
Field Summary
Fields Modifier and Type Field Description protected java.nio.ByteBuffercompressedDataprotected intcompressedOffsetprotected TileCompressionTypecompressionTypeprotected ICompressOptiontileOptions
-
Constructor Summary
Constructors Modifier Constructor Description protectedTileCompressionOperation(TiledImageCompressionOperation operation, int tileIndex, TileArea area)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description private java.nio.ByteBufferconvertToBuffer(java.lang.Object data)protected abstract AbstractNullPixelMaskcreateImageNullPixelMask(ImageNullPixelMask imageNullPixelMask)protected voidforceNoLoss(boolean value)should the data of this tile be forced to case no data loss.protected byte[]getCompressedData()protected java.nio.ByteBuffergetCompressedWholeArea()protected TileCompressionTypegetCompressionType()protected ICompressorControlgetCompressorControl()protected ICompressorControlgetGzipCompressorControl()protected TileCompressionOperationinitTileOptions()protected TileCompressionOperationsetCompressed(java.lang.Object data, TileCompressionType type)protected TileCompressionOperationsetCompressedOffset(int value)TileCompressionOperationsetDimensions(int dataOffset, int width, int height)protected voidsetWholeImageCompressedBuffer(java.nio.ByteBuffer compressed)set the buffer that describes the whole compressed image and let the tile create a slice of it from the position where the tile starts in the whole image.java.lang.StringtoString()-
Methods inherited from class nom.tam.image.tile.operation.AbstractTileOperation
execute, getArea, getBaseType, getPixelSize, getPreviousTileOperation, getTileBuffer, getTiledImageOperation, getTileIndex, setTileBuffer, setWholeImageBuffer, waitForResult
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface nom.tam.image.tile.operation.ITileOperation
waitForResult
-
-
-
-
Field Detail
-
compressedData
protected java.nio.ByteBuffer compressedData
-
compressedOffset
protected int compressedOffset
-
compressionType
protected TileCompressionType compressionType
-
tileOptions
protected ICompressOption tileOptions
-
-
Constructor Detail
-
TileCompressionOperation
protected TileCompressionOperation(TiledImageCompressionOperation operation, int tileIndex, TileArea area)
-
-
Method Detail
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
convertToBuffer
private java.nio.ByteBuffer convertToBuffer(java.lang.Object data)
-
forceNoLoss
protected void forceNoLoss(boolean value)
should the data of this tile be forced to case no data loss. This information is not relevant in all cases that it is ignored by default.- Parameters:
value- the value to set.
-
getCompressedData
protected byte[] getCompressedData()
-
getCompressedWholeArea
protected java.nio.ByteBuffer getCompressedWholeArea()
-
getCompressionType
protected TileCompressionType getCompressionType()
-
getCompressorControl
protected ICompressorControl getCompressorControl()
-
getGzipCompressorControl
protected ICompressorControl getGzipCompressorControl()
-
initTileOptions
protected TileCompressionOperation initTileOptions()
-
setCompressed
protected TileCompressionOperation setCompressed(java.lang.Object data, TileCompressionType type)
-
setCompressedOffset
protected TileCompressionOperation setCompressedOffset(int value)
-
setDimensions
public TileCompressionOperation setDimensions(int dataOffset, int width, int height)
- Specified by:
setDimensionsin interfaceITileOperation- Overrides:
setDimensionsin classAbstractTileOperation
-
setWholeImageCompressedBuffer
protected void setWholeImageCompressedBuffer(java.nio.ByteBuffer compressed)
set the buffer that describes the whole compressed image and let the tile create a slice of it from the position where the tile starts in the whole image. Attention this method is not thread-safe because it changes the position of the buffer parameter. This buffer is just as big as the image buffer but will be reduced to the needed size as a last step of the Compression.- Parameters:
compressed- the buffer that describes the whole image.
-
createImageNullPixelMask
protected abstract AbstractNullPixelMask createImageNullPixelMask(ImageNullPixelMask imageNullPixelMask)
-
-