|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface RasterGraphics
Raster graphics interface (representation of pixel bitmap).
| Field Summary | |
|---|---|
static java.lang.String |
BANDS
|
static java.lang.String |
COLORMODE
|
static java.lang.String |
HEIGHT
|
static int |
MODE_BAND
Higher dimensional pixel values (0 to getMaxRGB()). |
static int |
MODE_COLORMAP
Colormapped pixels (0 to getMaxColormap()). |
static int |
MODE_GRAY
Gray pixel values (0 to getMaxGray()). |
static int |
MODE_RGB
True-color pixel values (0 to getMaxRGB()). |
static int |
MODE_RGBA
True-color pixel values with alpha-channel (0 to getMaxRGB()). |
static java.lang.String |
WIDTH
|
| Fields inherited from interface cz.cuni.jagrlib.iface.Property |
|---|
LOGGING, STATISTICS, TEXT_DESCRIPTION |
| Method Summary | |
|---|---|
int |
getBands()
Number of color bands of the bitmap. |
java.awt.image.BufferedImage |
getBufferedImage()
Copies raster graphics to a BufferedImage object. |
void |
getColormap(int i0,
int length,
double[][] _colors)
Returns the colormap segment (for color modes: "getColormapType() == MODE_RGB || getColormapType() == MODE_RGBA || getColormapType() == MODE_BAND"). |
void |
getColormap(int i0,
int length,
int[][] _colors)
Returns the colormap segment (for color modes: "getColormapType() == MODE_RGB || getColormapType() == MODE_RGBA || getColormapType() == MODE_BAND"). |
int |
getColormapType()
Colormap mode (valid only for MODE_COLORMAP bitmap mode). |
int |
getGray(int x,
int y)
Returns the pixel's gray value (for all modes). |
double |
getGrayDouble(int x,
int y)
Returns the pixel's gray value (for all modes). |
int |
getHeight()
Height of the bitmap. |
void |
getHLine(int x1,
int x2,
int y,
double[] _colors)
Returns the values for the given horizontal line (for MODE_GRAY). |
void |
getHLine(int x1,
int x2,
int y,
double[][] _colors)
Returns the values for the given horizontal line (for MODE_RGB, MODE_RGBA or MODE_BAND). |
void |
getHLine(int x1,
int x2,
int y,
int[] _colors)
Returns the values for the given horizontal line (for MODE_GRAY or MODE_COLORMAP). |
void |
getHLine(int x1,
int x2,
int y,
int[][] _colors)
Returns the values for the given horizontal line (for MODE_RGB, MODE_RGBA or MODE_BAND). |
int |
getMaxColormap()
Maximal ordinal number of colormap entry. |
int |
getMaxGray()
Maximal gray value. |
int |
getMaxRGB()
Maximal RGB[A] value. |
int |
getMode()
Sample (color) model of the bitmap. |
int |
getPixel(int x,
int y)
Returns the pixel's value (for MODE_GRAY or
MODE_COLORMAP). |
void |
getPixel(int x,
int y,
double[] _color)
Returns the pixel's value (for MODE_RGB,
MODE_RGBA or MODE_BAND). |
void |
getPixel(int x,
int y,
int[] _color)
Returns the pixel's value (for MODE_RGB,
MODE_RGBA or MODE_BAND). |
double |
getPixelDouble(int x,
int y)
Returns the pixel's value (for MODE_GRAY). |
void |
getRGB(int x,
int y,
double[] _color)
Returns the pixel's RGB[A] values (for all graphic modes). |
void |
getRGB(int x,
int y,
int[] _color)
Returns the pixel's RGB[A] values (for all graphic modes). |
int |
getWidth()
Width of the bitmap. |
void |
init()
RasterGraphics re-initialization (keeps current bitmap size and mode). |
void |
init(int _width,
int _height,
int _mode,
int _bands)
RasterGraphics (re-)initialization. |
void |
putHLine(int x1,
int x2,
int y,
double[] _colors)
Sets the horizontal line's values (for MODE_GRAY). |
void |
putHLine(int x1,
int x2,
int y,
double[][] _colors)
Sets the horizontal line's values (for MODE_RGB,
MODE_RGBA or MODE_BAND). |
void |
putHLine(int x1,
int x2,
int y,
int[] _colors)
Sets the horizontal line's values (for MODE_GRAY or
MODE_COLORMAP). |
void |
putHLine(int x1,
int x2,
int y,
int[][] _colors)
Sets the horizontal line's values (for MODE_RGB,
MODE_RGBA or MODE_BAND). |
void |
putPixel(int x,
int y,
double _color)
Sets the given pixel's value (for MODE_GRAY). |
void |
putPixel(int x,
int y,
double[] _color)
Sets the given pixel's value (for MODE_RGB,
MODE_RGBA or MODE_BAND). |
void |
putPixel(int x,
int y,
int _color)
Sets the given pixel's value (for MODE_GRAY or
MODE_COLORMAP). |
void |
putPixel(int x,
int y,
int[] _color)
Sets the given pixel's value (for MODE_RGB,
MODE_RGBA or MODE_BAND). |
void |
setAlpha(double _alpha)
Sets the current drawing alpha (for MODE_RGB,
MODE_RGBA or MODE_GRAY). |
int |
setAlphaOperation(int _op)
Sets the alpha-channel operation (used in all set*() methods). |
void |
setBufferedImage(java.awt.image.BufferedImage bi)
Initializes raster graphics from a BufferedImage object. |
void |
setColor(double _color)
Sets the current drawing color (for MODE_GRAY). |
void |
setColor(double[] _color)
Sets the current drawing color (for MODE_RGB,
MODE_RGBA or MODE_BAND). |
void |
setColor(int _color)
Sets the current drawing color (for MODE_GRAY or
MODE_COLORMAP). |
void |
setColor(int[] _color)
Sets the current drawing color (for MODE_RGB,
MODE_RGBA or MODE_BAND). |
void |
setColormap(double[][] _colors)
Sets the colormap segment (for color modes: "getColormapType() == MODE_RGB || getColormapType() == MODE_RGBA || getColormapType() == MODE_BAND"). |
void |
setColormap(int[][] _colors)
Sets the colormap segment (for color modes: "getColormapType() == MODE_RGB || getColormapType() == MODE_RGBA || getColormapType() == MODE_BAND"). |
void |
setColormapType(int _mode,
int _max)
Sets the colormap mode (valid only for MODE_COLORMAP bitmap mode). |
void |
setHLine(int x1,
int x2,
int y)
Sets the horizontal line from [min(x1,x2),y] to [max(x1,x2)-1,y]. |
void |
setHLine(int x1,
int x2,
int y,
double _color)
Sets the horizontal line from [min(x1,x2),y] to [max(x1,x2)-1,y] (for MODE_GRAY). |
void |
setHLine(int x1,
int x2,
int y,
double[] _color)
Sets the horizontal line from [min(x1,x2),y] to [max(x1,x2)-1,y] (for MODE_RGB, MODE_RGBA or MODE_BAND). |
void |
setHLine(int x1,
int x2,
int y,
int _color)
Sets the horizontal line from [min(x1,x2),y] to [max(x1,x2)-1,y] (for MODE_GRAY or MODE_COLORMAP). |
void |
setHLine(int x1,
int x2,
int y,
int[] _color)
Sets the horizontal line from [min(x1,x2),y] to [max(x1,x2)-1,y] (for MODE_RGB, MODE_RGBA or MODE_BAND). |
int |
setOperation(int _op)
Sets the binary set operation (used in all set*() methods). |
void |
setPixel(int x,
int y)
Sets the given pixel's value. |
void |
setRectangle(int x1,
int y1,
int x2,
int y2)
Sets the rectangle from [min(x1,x2),min(y1,y2)] to [max(x1,x2)-1,max(y1,y2)-1]. |
void |
setRectangle(int x1,
int y1,
int x2,
int y2,
double _color)
Sets the rectangle from [min(x1,x2),min(y1,y2)] to [max(x1,x2)-1,max(y1,y2)-1] (for MODE_GRAY). |
void |
setRectangle(int x1,
int y1,
int x2,
int y2,
double[] _color)
Sets the rectangle from [min(x1,x2),min(y1,y2)] to [max(x1,x2)-1,max(y1,y2)-1] (for MODE_RGB, MODE_RGBA or MODE_BAND). |
void |
setRectangle(int x1,
int y1,
int x2,
int y2,
int _color)
Sets the rectangle from [min(x1,x2),min(y1,y2)] to [max(x1,x2)-1,max(y1,y2)-1] (for MODE_GRAY or MODE_COLORMAP). |
void |
setRectangle(int x1,
int y1,
int x2,
int y2,
int[] _color)
Sets the rectangle from [min(x1,x2),min(y1,y2)] to [max(x1,x2)-1,max(y1,y2)-1] (for MODE_RGB, MODE_RGBA or MODE_BAND). |
ValueTransferFunction |
setTransferFunction(ValueTransferFunction _transfer)
Sets the value-transfer function (used in all set*() methods). |
| Methods inherited from interface cz.cuni.jagrlib.iface.Property |
|---|
commit, get, set |
| Field Detail |
|---|
static final java.lang.String WIDTH
static final java.lang.String HEIGHT
static final java.lang.String COLORMODE
static final java.lang.String BANDS
static final int MODE_GRAY
getMaxGray()).
static final int MODE_COLORMAP
getMaxColormap()).
getColormapType(),
setColormapType(int, int),
Constant Field Valuesstatic final int MODE_RGB
getMaxRGB()).
static final int MODE_RGBA
getMaxRGB()).
static final int MODE_BAND
getMaxRGB()).
| Method Detail |
|---|
void init(int _width,
int _height,
int _mode,
int _bands)
RasterGraphics (re-)initialization.
_width - Width of a new bitmap._height - Height of a new bitmap._mode - Pixel value type (RasterGraphics.MODE_* constant)._bands - Number of bands (for MODE_BAND).setColormapType(int, int)void init()
RasterGraphics re-initialization (keeps current bitmap size and mode).
int getWidth()
int getHeight()
int getMode()
int getBands()
int getMaxGray()
int getMaxColormap()
int getMaxRGB()
java.awt.image.BufferedImage getBufferedImage()
BufferedImage object.
BufferedImage object.setBufferedImage(java.awt.image.BufferedImage)void setBufferedImage(java.awt.image.BufferedImage bi)
BufferedImage object.
bi - Raster data.getBufferedImage()int getColormapType()
MODE_COLORMAP bitmap mode).
void setColormapType(int _mode,
int _max)
MODE_COLORMAP bitmap mode).
_mode - Colormap mode (one of (RasterGraphics.MODE_* constants)._max - Maximal index of colormap entry.
void getColormap(int i0,
int length,
double[][] _colors)
i0 - The first colormap index.length - Length of colormap segment._colors - Returned color levels (each band: from 0.0 to 1.0).
void getColormap(int i0,
int length,
int[][] _colors)
i0 - The first colormap index.length - Length of colormap segment._colors - Returned color levels (each band: from 0 to getMaxRGB()).void setColormap(double[][] _colors)
setColormapType(int, int).
_colors - Color levels to be set (each band: from 0.0 to 1.0).void setColormap(int[][] _colors)
setColormapType(int, int).
_colors - Color levels to be set (each band: from 0 to getMaxRGB()).int setOperation(int _op)
_op - Binary set operation (BinaryOperation.BIN_OP_* constant).
Binary operationsint setAlphaOperation(int _op)
_op - Alpha-channel operation (AlphaOperation.ALPHA_* constant).
Alpha-channel operationsValueTransferFunction setTransferFunction(ValueTransferFunction _transfer)
_transfer - New value-transfer function or null.
Value-transfor function prototypevoid setColor(int _color)
MODE_GRAY or
MODE_COLORMAP).
_color - Current drawing color (0 to getMaxGray() or
getMaxColormap()).void setColor(double _color)
MODE_GRAY).
_color - Current drawing color (0.0 to 1.0).void setColor(int[] _color)
MODE_RGB,
MODE_RGBA or MODE_BAND).
_color - Current drawing color (channel values between 0 and getMaxRGB()).void setColor(double[] _color)
MODE_RGB,
MODE_RGBA or MODE_BAND).
_color - Current drawing color (channel values between 0.0 and 1.0).void setAlpha(double _alpha)
MODE_RGB,
MODE_RGBA or MODE_GRAY).
_alpha - Current drawing alpha (values between 0.0 and 1.0).
void setPixel(int x,
int y)
Ignores any off-canvas access.
x - X coordinate of a pixel.y - Y coordinate of a pixel.setColor(int),
setColor(double),
setColor(int[]),
setColor(double[])
void putPixel(int x,
int y,
int _color)
MODE_GRAY or
MODE_COLORMAP).
Ignores any off-canvas access.
x - X coordinate of a pixel.y - Y coordinate of a pixel._color - Pixel color (between 0 and getMaxGray() or
getMaxColormap()).
void putPixel(int x,
int y,
double _color)
MODE_GRAY).
Ignores any off-canvas access.
x - X coordinate of a pixel.y - Y coordinate of a pixel._color - Pixel color (between 0.0 and 1.0).
void putPixel(int x,
int y,
int[] _color)
MODE_RGB,
MODE_RGBA or MODE_BAND).
Ignores any off-canvas access.
x - X coordinate of a pixel.y - Y coordinate of a pixel._color - Pixel color (between 0 and getMaxRGB()).
void putPixel(int x,
int y,
double[] _color)
MODE_RGB,
MODE_RGBA or MODE_BAND).
Ignores any off-canvas access.
x - X coordinate of a pixel.y - Y coordinate of a pixel._color - Pixel color (between 0.0 and 1.0).
int getPixel(int x,
int y)
MODE_GRAY or
MODE_COLORMAP).
x - X coordinate of a pixel.y - Y coordinate of a pixel.
double getPixelDouble(int x,
int y)
MODE_GRAY).
x - X coordinate of a pixel.y - Y coordinate of a pixel.
void getPixel(int x,
int y,
int[] _color)
MODE_RGB,
MODE_RGBA or MODE_BAND).
x - X coordinate of a pixel.y - Y coordinate of a pixel._color - Current pixel RGB[A] value.
void getPixel(int x,
int y,
double[] _color)
MODE_RGB,
MODE_RGBA or MODE_BAND).
x - X coordinate of a pixel.y - Y coordinate of a pixel._color - Current pixel RGB[A] value.
void getRGB(int x,
int y,
int[] _color)
x - X coordinate of a pixel.y - Y coordinate of a pixel._color - Current pixel RGB[A] value (if the array's length is at least 4, alpha will be returned).
void getRGB(int x,
int y,
double[] _color)
x - X coordinate of a pixel.y - Y coordinate of a pixel._color - Current pixel RGB[A] value (if the array's length is at least 4, alpha will be returned).
int getGray(int x,
int y)
x - X coordinate of a pixel.y - Y coordinate of a pixel.
double getGrayDouble(int x,
int y)
x - X coordinate of a pixel.y - Y coordinate of a pixel.
void setHLine(int x1,
int x2,
int y)
Ignores any off-canvas access.
x1 - X coordinate of the starting pixel.x2 - X coordinate of the first pixel after the line.y - Common Y coordinate of the line.setColor(int),
setColor(double),
setColor(int[]),
setColor(double[])
void setHLine(int x1,
int x2,
int y,
int _color)
MODE_GRAY or MODE_COLORMAP).
Ignores any off-canvas access.
x1 - X coordinate of the starting pixel.x2 - X coordinate of the first pixel after the line.y - Common Y coordinate of the line._color - Drawing color (0 to getMaxGray() or
getMaxColormap()).
void setHLine(int x1,
int x2,
int y,
double _color)
MODE_GRAY).
Ignores any off-canvas access.
x1 - X coordinate of the starting pixel.x2 - X coordinate of the first pixel after the line.y - Common Y coordinate of the line._color - Drawing color (0.0 to 1.0).
void setHLine(int x1,
int x2,
int y,
int[] _color)
MODE_RGB, MODE_RGBA or MODE_BAND).
Ignores any off-canvas access.
x1 - X coordinate of the starting pixel.x2 - X coordinate of the first pixel after the line.y - Common Y coordinate of the line._color - Drawing color (channel values between 0 and getMaxRGB()).
void setHLine(int x1,
int x2,
int y,
double[] _color)
MODE_RGB, MODE_RGBA or MODE_BAND).
Ignores any off-canvas access.
x1 - X coordinate of the starting pixel.x2 - X coordinate of the first pixel after the line.y - Common Y coordinate of the line._color - Drawing color (channel values between 0.0 and 1.0).
void putHLine(int x1,
int x2,
int y,
int[] _colors)
MODE_GRAY or
MODE_COLORMAP).
Ignores any off-canvas access.
x1 - X coordinate of the starting pixel.x2 - X coordinate of the first pixel after the line.y - Common Y coordinate of the line._colors - Line colors (between 0 and getMaxGray() or
getMaxColormap()).
void putHLine(int x1,
int x2,
int y,
double[] _colors)
MODE_GRAY).
Ignores any off-canvas access.
x1 - X coordinate of the starting pixel.x2 - X coordinate of the first pixel after the line.y - Common Y coordinate of the line._colors - Line colors (between 0.0 and 1.0).
void putHLine(int x1,
int x2,
int y,
int[][] _colors)
MODE_RGB,
MODE_RGBA or MODE_BAND).
Ignores any off-canvas access.
x1 - X coordinate of the starting pixel.x2 - X coordinate of the first pixel after the line.y - Common Y coordinate of the line._colors - Line colors (between 0 and getMaxRGB()).
void putHLine(int x1,
int x2,
int y,
double[][] _colors)
MODE_RGB,
MODE_RGBA or MODE_BAND).
Ignores any off-canvas access.
x1 - X coordinate of the starting pixel.x2 - X coordinate of the first pixel after the line.y - Common Y coordinate of the line._colors - Line colors (between 0.0 and 1.0).
void getHLine(int x1,
int x2,
int y,
int[] _colors)
MODE_GRAY or MODE_COLORMAP).
x1 - X coordinate of the starting pixel.x2 - X coordinate of the first pixel after the line.y - Common Y coordinate of the line._colors - Returned colors (0 to getMaxGray() or
getMaxColormap(), 0 for off-canvas access).
void getHLine(int x1,
int x2,
int y,
double[] _colors)
MODE_GRAY).
x1 - X coordinate of the starting pixel.x2 - X coordinate of the first pixel after the line.y - Common Y coordinate of the line._colors - Returned colors (0.0 to 1.0, 0.0 for off-canvas access).
void getHLine(int x1,
int x2,
int y,
int[][] _colors)
MODE_RGB, MODE_RGBA or MODE_BAND).
x1 - X coordinate of the starting pixel.x2 - X coordinate of the first pixel after the line.y - Common Y coordinate of the line._colors - Returned colors (channel values between 0 and
getMaxRGB(), 0 for off-canvas access).
void getHLine(int x1,
int x2,
int y,
double[][] _colors)
MODE_RGB, MODE_RGBA or MODE_BAND).
x1 - X coordinate of the starting pixel.x2 - X coordinate of the first pixel after the line.y - Common Y coordinate of the line._colors - Returned colors (channel values between 0.0 and 1.0, 0.0 for off-canvas access).
void setRectangle(int x1,
int y1,
int x2,
int y2)
Ignores any off-canvas access.
x1 - X coordinate of the upper left corner.y1 - Y coordinate of the upper left corner.x2 - X coordinate of the lower right corner (outside pixel).y2 - Y coordinate of the upper left corner (outside pixel).
void setRectangle(int x1,
int y1,
int x2,
int y2,
int _color)
MODE_GRAY or MODE_COLORMAP).
Ignores any off-canvas access.
x1 - X coordinate of the upper left corner.y1 - Y coordinate of the upper left corner.x2 - X coordinate of the lower right corner (outside pixel).y2 - Y coordinate of the upper left corner (outside pixel)._color - Drawing color (0 to getMaxGray() or
getMaxColormap()).
void setRectangle(int x1,
int y1,
int x2,
int y2,
double _color)
MODE_GRAY).
Ignores any off-canvas access.
x1 - X coordinate of the upper left corner.y1 - Y coordinate of the upper left corner.x2 - X coordinate of the lower right corner (outside pixel).y2 - Y coordinate of the upper left corner (outside pixel)._color - Drawing color (0.0 to 1.0).
void setRectangle(int x1,
int y1,
int x2,
int y2,
int[] _color)
MODE_RGB, MODE_RGBA or MODE_BAND).
Ignores any off-canvas access.
x1 - X coordinate of the upper left corner.y1 - Y coordinate of the upper left corner.x2 - X coordinate of the lower right corner (outside pixel).y2 - Y coordinate of the upper left corner (outside pixel)._color - Drawing color (0 to getMaxRGB()).
void setRectangle(int x1,
int y1,
int x2,
int y2,
double[] _color)
MODE_RGB, MODE_RGBA or MODE_BAND).
Ignores any off-canvas access.
x1 - X coordinate of the upper left corner.y1 - Y coordinate of the upper left corner.x2 - X coordinate of the lower right corner (outside pixel).y2 - Y coordinate of the upper left corner (outside pixel)._color - Drawing color (0.0 to 1.0).
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||