public class ImageRasterLayer extends RasterLayer
Modifier and Type | Field and Description |
---|---|
protected java.awt.Graphics2D |
graphics
The graphics associated with the image if the image is in draw mode.
|
protected java.awt.image.BufferedImage |
image
The underlying image
|
protected double |
xscale
The scale of the image on the x-axis in terms of pixels per input units
|
protected double |
yscale
The scale of the image on the y-axis in terms of pixels per input units
|
height, inputMBR, width
Constructor and Description |
---|
ImageRasterLayer()
Default constructor is necessary to be able to deserialize it
|
ImageRasterLayer(Rectangle inputMBR,
int width,
int height)
Creates a raster layer of the given size for a given (portion of) input
data.
|
Modifier and Type | Method and Description |
---|---|
void |
drawShape(Shape shape) |
java.awt.image.BufferedImage |
getImage() |
protected java.awt.Graphics2D |
getOrCreateGrahics(boolean translate) |
void |
mergeWith(ImageRasterLayer another) |
void |
readFields(java.io.DataInput in) |
void |
setColor(java.awt.Color color) |
void |
write(java.io.DataOutput out) |
getHeight, getInputMBR, getWidth, projectToImageSpace
protected java.awt.image.BufferedImage image
protected java.awt.Graphics2D graphics
protected double xscale
protected double yscale
public ImageRasterLayer()
public ImageRasterLayer(Rectangle inputMBR, int width, int height)
inputMBR
- - the MBR of the input area to rasterizewidth
- - width the of the image to generate in pixelsheight
- - height of the image to generate in pixelspublic void setColor(java.awt.Color color)
public void write(java.io.DataOutput out) throws java.io.IOException
write
in class RasterLayer
java.io.IOException
public void readFields(java.io.DataInput in) throws java.io.IOException
readFields
in class RasterLayer
java.io.IOException
public void mergeWith(ImageRasterLayer another)
public java.awt.image.BufferedImage getImage()
protected java.awt.Graphics2D getOrCreateGrahics(boolean translate)
public void drawShape(Shape shape)