Class TileBufferColumnBased
- java.lang.Object
-
- nom.tam.image.tile.operation.buffer.TileBuffer
-
- nom.tam.image.tile.operation.buffer.TileBufferColumnBased
-
class TileBufferColumnBased extends TileBuffer
This subclass of the row based view, will abstract the problems that occur when the tile does not spread over a whole row. in that case the buffer describing the image does not match the buffer describing the tile. That is why a temporary buffer is needed to make the buffer continuous.
-
-
Field Summary
Fields Modifier and Type Field Description private java.nio.BuffergapLessBufferthe buffer representing the tile data gap less.private intimageWidththe width of the image in pixels, that differs from the width of the tile.
-
Constructor Summary
Constructors Constructor Description TileBufferColumnBased(PrimitiveType<java.nio.Buffer> baseType, int dataOffset, int imageWidth, int width, int height)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description private voidcreateGapLessBuffer()create the temporary buffer that contains no data gaps.private voiddesolveGapLessBuffer()resolve the temporary buffer that contains no data gaps, and put the data back into the image buffer.voidfinish()nothing to do in the normal case, overwrite this method if post processing is necessary.java.nio.BuffergetBuffer()private intgetPixelSizeInData()private PrimitiveType<java.nio.Buffer>primitiveType()-
Methods inherited from class nom.tam.image.tile.operation.buffer.TileBuffer
getBaseType, getHeight, getImageBuffer, getPixelSize, getWidth, setData
-
-
-
-
Field Detail
-
gapLessBuffer
private java.nio.Buffer gapLessBuffer
the buffer representing the tile data gap less. this will exist only between the first getBuffer() and the finish(). This way the memory used for the data copy is allocates as early as needed and freed as soon as possible.
-
imageWidth
private final int imageWidth
the width of the image in pixels, that differs from the width of the tile.
-
-
Constructor Detail
-
TileBufferColumnBased
TileBufferColumnBased(PrimitiveType<java.nio.Buffer> baseType, int dataOffset, int imageWidth, int width, int height)
-
-
Method Detail
-
finish
public void finish()
Description copied from class:TileBuffernothing to do in the normal case, overwrite this method if post processing is necessary.- Overrides:
finishin classTileBuffer
-
getBuffer
public java.nio.Buffer getBuffer()
- Specified by:
getBufferin classTileBuffer
-
createGapLessBuffer
private void createGapLessBuffer()
create the temporary buffer that contains no data gaps.
-
desolveGapLessBuffer
private void desolveGapLessBuffer()
resolve the temporary buffer that contains no data gaps, and put the data back into the image buffer.
-
getPixelSizeInData
private int getPixelSizeInData()
- Returns:
- size of the tile data inside the image data. normally tile-height*image-width but then the data block of the last tile would go over the image data limit.
-
primitiveType
private PrimitiveType<java.nio.Buffer> primitiveType()
-
-