T
- The pixel typeI
- The concrete subclass typeS
- The concrete subclass type of each bandpublic abstract class MultiBandRenderer<T extends Comparable<T>,I extends MultiBandImage<T,I,S>,S extends SingleBandImage<T,S>> extends ImageRenderer<T[],I>
ImageRenderer
s that work on MultiBandImage
s.hints, targetImage
Constructor and Description |
---|
MultiBandRenderer(I targetImage)
Construct with given target image.
|
MultiBandRenderer(I targetImage,
RenderHints hints)
Construct with given target image and rendering hints.
|
Modifier and Type | Method and Description |
---|---|
void |
drawImage(S image,
int x,
int y)
Draws the given single band image onto each band at the given position.
|
void |
drawImage(S image,
int band,
int x,
int y)
Draws the given single band image onto the specific band at the given
position.
|
void |
drawLine(float x0,
float y0,
float x1,
float y1,
int thickness,
T[] grey)
Draw a line from the coordinates specified by
(x0,y0) to the
coordinates specified by (x1,y1) using the given color and
thickness. |
void |
drawLine(int x1,
int y1,
double theta,
int length,
int thickness,
T[] grey)
Draw a line from the coordinates specified by
(x1,y1) at an
angle of theta with the given length, thickness and colour. |
void |
drawLine(int x0,
int y0,
int x1,
int y1,
int thickness,
T[] grey)
Draw a line from the coordinates specified by
(x0,y0) to the
coordinates specified by (x1,y1) using the given color and
thickness. |
void |
drawPoint(Point2d p,
T[] col,
int size)
Draw a dot centered on the given location (rounded to nearest integer
location) at the given size and with the given color.
|
void |
drawPolygon(Polygon p,
int thickness,
T[] grey)
Draw the given polygon in the specified colour with the given thickness
lines.
|
defaultBackgroundColour, defaultForegroundColour, drawConnectedPoints, drawCubicBezier, drawHorizLine, drawImage, drawImage, drawLine, drawLine, drawLine, drawLine, drawLine, drawLines, drawPath, drawPaths, drawPoints, drawPolygon, drawPolygonFilled, drawQuadBezier, drawShape, drawShape, drawShapeFilled, drawText, drawText, drawText, drawText, drawText, drawText, drawText, drawText, getImage, getRenderHints, sanitise, setImage, setRenderHints
public MultiBandRenderer(I targetImage)
targetImage
- the target image.public MultiBandRenderer(I targetImage, RenderHints hints)
targetImage
- the target image.hints
- the render hintspublic void drawImage(S image, int x, int y)
image
- A SingleBandImage
to drawx
- The x-coordinate for the top-left of the drawn imagey
- The y-coordinate for the top-left of the drawn imagepublic void drawImage(S image, int band, int x, int y)
image
- A SingleBandImage
to drawband
- The band onto which the image will be drawnx
- The x-coordinate for the top-left of the drawn imagey
- The y-coordinate for the top-left of the drawn imagepublic void drawLine(int x1, int y1, double theta, int length, int thickness, T[] grey)
(x1,y1)
at an
angle of theta
with the given length, thickness and colour.drawLine
in class ImageRenderer<T extends Comparable<T>[],I extends MultiBandImage<T,I,S>>
x1
- The x-coordinate to start the line.y1
- The y-coordinate to start the line.theta
- The angle at which to draw the line.length
- The length to draw the line.thickness
- The thickness to draw the line.grey
- The colour to draw the line.ImageRenderer.drawLine(int, int, double,
int, int, java.lang.Object)
public void drawLine(int x0, int y0, int x1, int y1, int thickness, T[] grey)
(x0,y0)
to the
coordinates specified by (x1,y1)
using the given color and
thickness.drawLine
in class ImageRenderer<T extends Comparable<T>[],I extends MultiBandImage<T,I,S>>
x0
- The x-coordinate at the start of the line.y0
- The y-coordinate at the start of the line.x1
- The x-coordinate at the end of the line.y1
- The y-coordinate at the end of the line.thickness
- The thickness which to draw the line.grey
- The colour in which to draw the line.ImageRenderer.drawLine(int, int, int,
int, int, java.lang.Object)
public void drawLine(float x0, float y0, float x1, float y1, int thickness, T[] grey)
(x0,y0)
to the
coordinates specified by (x1,y1)
using the given color and
thickness.drawLine
in class ImageRenderer<T extends Comparable<T>[],I extends MultiBandImage<T,I,S>>
x0
- The x-coordinate at the start of the line.y0
- The y-coordinate at the start of the line.x1
- The x-coordinate at the end of the line.y1
- The y-coordinate at the end of the line.thickness
- The thickness which to draw the line.grey
- The colour in which to draw the line.ImageRenderer.drawLine(int, int, int,
int, int, java.lang.Object)
public void drawPoint(Point2d p, T[] col, int size)
drawPoint
in class ImageRenderer<T extends Comparable<T>[],I extends MultiBandImage<T,I,S>>
p
- The coordinates at which to draw the pointcol
- The colour to draw the pointsize
- The size at which to draw the point.ImageRenderer.drawPoint(org.openimaj.math.geometry.point.Point2d,
java.lang.Object, int)
public void drawPolygon(Polygon p, int thickness, T[] grey)
drawPolygon
in class ImageRenderer<T extends Comparable<T>[],I extends MultiBandImage<T,I,S>>
p
- The polygon to draw.thickness
- The thickness of the lines to usegrey
- The colour to draw the lines inImageRenderer.drawPolygon(org.openimaj.math.geometry.shape.Polygon,
int, java.lang.Object)