@Override protected ByteBufferRasterData createCompatibleEmptyRasterData() { return new LineInterleavedRasterData( getView(), getOriginalWidth(), getOriginalHeight(), dataAccess.getReader(), dataInfo, false ); }
@Override public BandInterleavedRasterData createCompatibleRasterData( DataView view ) { return new BandInterleavedRasterData( view, getOriginalWidth(), getOriginalHeight(), dataAccess.getReader(), dataInfo, false ); }
@Override public PixelInterleavedRasterData createCompatibleRasterData( DataView view ) { return new PixelInterleavedRasterData( view, getOriginalWidth(), getOriginalHeight(), dataAccess.getReader(), dataInfo, false ); }
public float[] getFloatPixel( int x, int y, float[] result ) { if ( result == null || result.length < getView().dataInfo.bands ) { result = new float[getView().dataInfo.bands]; } for ( int band = 0; band < getView().dataInfo.bands; band++ ) { result[band] = getFloatSample( x, y, band ); } return result; }
public byte[] getBytePixel( int x, int y, byte[] result ) { if ( result == null || result.length < getView().dataInfo.bands ) { result = new byte[getView().dataInfo.bands]; } for ( int band = 0; band < getView().dataInfo.bands; band++ ) { result[band] = getByteSample( x, y, band ); } return result; }
public double[] getDoublePixel( int x, int y, double[] result ) { if ( result == null || result.length < getView().dataInfo.bands ) { result = new double[getView().dataInfo.bands]; } for ( int band = 0; band < getView().dataInfo.bands; band++ ) { result[band] = getDoubleSample( x, y, band ); } return result; }
public int[] getIntPixel( int x, int y, int[] result ) { if ( result == null || result.length < getView().dataInfo.bands ) { result = new int[getView().dataInfo.bands]; } for ( int band = 0; band < getView().dataInfo.bands; band++ ) { result[band] = getIntSample( x, y, band ); } return result; }
/** * Fills the entire buffer with no data values. Note this operation is only possible on writable buffers. */ public void fillWithNoData() { dataAccess.fillWithNoData(); }
/** * Use the given bytebuffer as a data source. This method should be handled with much care. * * @param buf * to set. * @param dataRect * defining the width, height and position of the data. */ public void setByteBuffer( ByteBuffer buf, DataView dataRect ) { dataAccess.setByteBuffer( buf, dataRect ); }
/** * @return The internal ByteBuffer. */ public ByteBuffer getByteBuffer() { if ( data == null ) { prepareBuffer(); } return data; }
/** * @return The internal ByteBuffer. */ public ByteBuffer getByteBuffer() { return dataAccess.getByteBuffer(); }
/** * @return the view on the data */ public DataView getView() { return dataAccess.getView(); }
/** * @return the domain of validity of the byte buffer, which need not be the view on the data. */ public RasterRect getBytebufferDomain() { return dataAccess.getBytebufferDomain(); }
/** * @return true if the view lies totally within data range. */ public boolean isWithinDataArea() { return dataAccess.isWithinDataArea(); }
/** * @return true if the view lies totally outside data range. */ public boolean isOutside() { return dataAccess.isOutside(); }
/** * Returns the needed size of the ByteBuffer in bytes. * * @return size of the buffer */ public final int getRequiredBufferSize() { // data.capacity() can not be used if the ByteBuffer was not yet instantiated. // return rasterWidth * rasterHeight * dataInfo.bands * dataInfo.dataSize; return dataAccess.requiredBufferSize(); }
/** * @return the Reader which supplies this buffer with data, may be <code>null</code> */ public RasterReader getReader() { return this.dataAccess.getReader(); } }
@Override public LineInterleavedRasterData createCompatibleRasterData( DataView view ) { return new LineInterleavedRasterData( view, getOriginalWidth(), getOriginalHeight(), dataAccess.getReader(), dataInfo, false ); }
@Override protected ByteBufferRasterData createCompatibleEmptyRasterData() { return new BandInterleavedRasterData( getView(), getOriginalWidth(), getOriginalHeight(), dataAccess.getReader(), this.dataInfo, false ); }
@Override protected ByteBufferRasterData createCompatibleEmptyRasterData() { return new PixelInterleavedRasterData( getView(), getOriginalWidth(), getOriginalHeight(), dataAccess.getReader(), this.dataInfo, false ); }