Class TileBufferColumnBased
java.lang.Object
nom.tam.image.tile.operation.buffer.TileBuffer
nom.tam.image.tile.operation.buffer.TileBufferColumnBased
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
FieldsModifier and TypeFieldDescriptionprivate Buffer
the buffer representing the tile data gap less.private final int
the width of the image in pixels, that differs from the width of the tile. -
Constructor Summary
ConstructorsConstructorDescriptionTileBufferColumnBased
(PrimitiveType<Buffer> baseType, int dataOffset, int imageWidth, int width, int height) -
Method Summary
Modifier and TypeMethodDescriptionprivate void
create the temporary buffer that contains no data gaps.private void
resolve the temporary buffer that contains no data gaps, and put the data back into the image buffer.void
finish()
nothing to do in the normal case, overwrite this method if post processing is necessary.private int
private PrimitiveType<Buffer>
Methods inherited from class nom.tam.image.tile.operation.buffer.TileBuffer
getBaseType, getHeight, getImageBuffer, getPixelSize, getWidth, setData
-
Field Details
-
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 imageWidththe width of the image in pixels, that differs from the width of the tile.
-
-
Constructor Details
-
TileBufferColumnBased
TileBufferColumnBased(PrimitiveType<Buffer> baseType, int dataOffset, int imageWidth, int width, int height)
-
-
Method Details
-
finish
public void finish()Description copied from class:TileBuffer
nothing to do in the normal case, overwrite this method if post processing is necessary.- Overrides:
finish
in classTileBuffer
-
getBuffer
- Specified by:
getBuffer
in 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
-