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 Details

    • gapLessBuffer

      private 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 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 class TileBuffer
    • getBuffer

      public Buffer getBuffer()
      Specified by:
      getBuffer in class TileBuffer
    • 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<Buffer> primitiveType()