public class BufferWrapperRaster extends AbstractDataRaster implements Cacheable, Disposable
Modifier and Type | Class and Description |
---|---|
protected static class |
BufferWrapperRaster.InterpolantLookupTable |
Modifier and Type | Field and Description |
---|---|
protected BufferWrapper |
buffer |
height, width
Constructor and Description |
---|
BufferWrapperRaster(int width,
int height,
Sector sector,
BufferWrapper buffer) |
BufferWrapperRaster(int width,
int height,
Sector sector,
BufferWrapper buffer,
AVList list) |
Modifier and Type | Method and Description |
---|---|
protected java.awt.geom.AffineTransform |
computeGeographicToRasterTransform(int width,
int height,
Sector sector) |
protected java.awt.geom.AffineTransform |
computeSourceToDestTransform(int sourceWidth,
int sourceHeight,
Sector sourceSector,
int destWidth,
int destHeight,
Sector destSector) |
protected BufferWrapperRaster.InterpolantLookupTable |
createLookupTable(int width,
int height,
double xMin,
double xMax,
double yMin,
double yMax,
java.awt.geom.AffineTransform lookupTransform) |
protected BufferWrapperRaster |
createSubRaster(int width,
int height,
Sector sector,
AVList params)
This returns a new sub-raster initialized with the specified properties.
|
void |
dispose()
Disposes of any internal resources allocated by the object.
|
protected void |
doDrawOnTo(BufferWrapperRaster canvas) |
void |
drawOnTo(DataRaster canvas)
Copies this raster into a specified raster.
|
void |
fill(double value) |
protected void |
get(int x,
int y,
int length,
double[] buffer,
int pos) |
BufferWrapper |
getBuffer() |
double |
getDoubleAtPosition(int row,
int col) |
double[] |
getExtremes()
Returns a two-element array containing this raster's extreme scalar values, ignoring any values marked as
missing-data.
|
long |
getSizeInBytes()
Retrieves the approximate size of this object in bytes.
|
double |
getTransparentValue() |
protected int |
indexFor(int x,
int y) |
protected void |
put(int x,
int y,
double[] buffer,
int pos,
int length) |
protected static void |
sample(double[] source,
int x1,
int x2,
double xf,
int y1,
int y2,
double yf,
int width,
double transparent,
double[] dest,
int destPos) |
void |
setDoubleAtPosition(int row,
int col,
double value) |
void |
setTransparentValue(double transparentValue) |
computeClipRect, getHeight, getSector, getSubRaster, getSubRaster, getWidth, setValue
addPropertyChangeListener, addPropertyChangeListener, clearList, copy, firePropertyChange, firePropertyChange, getBooleanValue, getBooleanValue, getChangeSupport, getDoubleValue, getDoubleValue, getEntries, getIntegerValue, getIntegerValue, getLongValue, getLongValue, getRestorableStateForAVPair, getStringValue, getStringValue, getStringValue, getValue, getValues, hasKey, removeKey, removePropertyChangeListener, removePropertyChangeListener, setValues
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
addPropertyChangeListener, addPropertyChangeListener, clearList, copy, firePropertyChange, firePropertyChange, getEntries, getStringValue, getValue, getValues, hasKey, removeKey, removePropertyChangeListener, removePropertyChangeListener, setValues
protected BufferWrapper buffer
public BufferWrapperRaster(int width, int height, Sector sector, BufferWrapper buffer)
public BufferWrapperRaster(int width, int height, Sector sector, BufferWrapper buffer, AVList list)
protected java.awt.geom.AffineTransform computeGeographicToRasterTransform(int width, int height, Sector sector)
computeGeographicToRasterTransform
in class AbstractDataRaster
protected java.awt.geom.AffineTransform computeSourceToDestTransform(int sourceWidth, int sourceHeight, Sector sourceSector, int destWidth, int destHeight, Sector destSector)
computeSourceToDestTransform
in class AbstractDataRaster
protected BufferWrapperRaster.InterpolantLookupTable createLookupTable(int width, int height, double xMin, double xMax, double yMin, double yMax, java.awt.geom.AffineTransform lookupTransform)
protected BufferWrapperRaster createSubRaster(int width, int height, Sector sector, AVList params)
doGetSubRaster
to create the sub-raster instance before populating its contents. This does not place any restrictions on the
specified width
, height
, sector
or params
.
This returns a
, a subclass of
BufferWrapperRaster backed by a ByteBuffer.BufferWrapper.ByteBufferWrapper
width
- the width of the sub-raster, in pixels.height
- the height of the sub-raster, in pixels.sector
- the sector the sub-raster occupies.params
- the parameters associated with the sub-raster.width
, height
,
sector
and params
.public void dispose()
Disposable
dispose
in interface Disposable
protected void doDrawOnTo(BufferWrapperRaster canvas)
public void drawOnTo(DataRaster canvas)
DataRaster
drawOnTo
in interface DataRaster
canvas
- - the raster to copy into.public void fill(double value)
protected void get(int x, int y, int length, double[] buffer, int pos)
public BufferWrapper getBuffer()
public double getDoubleAtPosition(int row, int col)
public double[] getExtremes()
public long getSizeInBytes()
Cacheable
getSizeInBytes
in interface Cacheable
Cacheable
object's size in bytespublic double getTransparentValue()
protected final int indexFor(int x, int y)
protected void put(int x, int y, double[] buffer, int pos, int length)
protected static void sample(double[] source, int x1, int x2, double xf, int y1, int y2, double yf, int width, double transparent, double[] dest, int destPos)
public void setDoubleAtPosition(int row, int col, double value)
public void setTransparentValue(double transparentValue)