|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.deegree.coverage.raster.data.nio.BufferAccess
public class BufferAccess
The BufferAccess
glue between the databuffer and the reader (which has access to the real data).
Field Summary | |
---|---|
protected RasterDataInfo |
dataInfo
the raster data info of the original data, not the view. |
Constructor Summary | |
---|---|
BufferAccess(RasterReader rasterReader,
int maxDataWidth,
int maxDataHeight,
DataView view,
RasterDataInfo dataInfo,
int pixelStride,
int lineStride,
int bandStride)
Glue |
Method Summary | |
---|---|
int |
calculatePos(int x,
int y)
Calculates the position of a pixel in the ByteBuffer. |
int |
calculatePos(int x,
int y,
int bandOfView)
Calculates the position of a sample in the ByteBuffer. |
int |
calculateViewPos(int x,
int y)
Calculates the position of a pixel in a view (FloatBuffer, etc.) of the ByteBuffer. |
int |
calculateViewPos(int x,
int y,
int band)
Calculates the position of a sample in a view (FloatBuffer, etc.) of the ByteBuffer. |
void |
dispose()
Set the memory buffer to null and call dispose on the reader as well. |
void |
fillWithNoData()
Fills the entire buffer with no data values. |
ByteBuffer |
getByteBuffer()
|
protected RasterRect |
getBytebufferDomain()
|
protected RasterRect |
getDataRectangle()
|
protected int |
getMaxDataHeight()
|
protected int |
getMaxDataWidth()
|
RasterReader |
getReader()
|
protected DataView |
getView()
|
protected boolean |
hasDataBuffer()
|
boolean |
isOutside()
|
void |
prepareBuffer()
Prepares the byte buffer for reading / writing thus instantiates it with values (no) data; |
int |
requiredBufferSize()
Returns the needed size of the ByteBuffer in bytes. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected RasterDataInfo dataInfo
Constructor Detail |
---|
public BufferAccess(RasterReader rasterReader, int maxDataWidth, int maxDataHeight, DataView view, RasterDataInfo dataInfo, int pixelStride, int lineStride, int bandStride)
rasterReader
- maxDataWidth
- maxDataHeight
- view
- dataInfo
- pixelStride
- lineStride
- bandStride
- Method Detail |
---|
public final int calculatePos(int x, int y)
x
- x coordinatey
- y coordinate
public final int calculatePos(int x, int y, int bandOfView)
x
- x coordinatey
- y coordinatebandOfView
- band index of the sample
public final int calculateViewPos(int x, int y)
x
- x coordinatey
- y coordinate
public final int calculateViewPos(int x, int y, int band)
x
- x coordinatey
- y coordinateband
- band index of the sample
public void prepareBuffer()
public void fillWithNoData()
public final int requiredBufferSize()
public ByteBuffer getByteBuffer()
public RasterReader getReader()
null
if the buffer is not backed by
data (a new memory based raster for example).protected int getMaxDataHeight()
protected int getMaxDataWidth()
protected RasterRect getBytebufferDomain()
protected boolean hasDataBuffer()
protected DataView getView()
protected RasterRect getDataRectangle()
public void dispose()
public boolean isOutside()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |