STIRA
0.1
|
Class with operations on image objects; This class draws within an existing image without creating a new image object. More...
#include <DrawImageTools.h>
Public Member Functions | |
DrawImageTools () | |
constructor | |
~DrawImageTools () | |
destructor | |
Static Public Member Functions | |
static void | DrawSquare (Image *pImageInOut, common::Point< int > myCenterPoint, int halfLength, ColorValue newColor) |
static void | DrawRectangle (ArrayGrid< double > *pGridInOut, common::Point< int > myTopLeftPoint, common::Point< int > myBottomRightPoint, double newValue, bool fillSurface) |
static void | DrawRectangle (ArrayGrid< double > *pGridInOut, common::RectangularROI< int > rroi, double newValue, bool fillSurface) |
static void | DrawRectangle (Image *pImageInOut, common::Point< int > myTopLeftPoint, common::Point< int > myBottomRightPoint, double newValue, bool fillSurface) |
static void | DrawRectangle (Image *pImageInOut, common::RectangularROI< int > rroi, double newValue, bool fillSurface) |
static void | DrawRectangle (Image *pImageInOut, common::Point< int > myTopLeftPoint, common::Point< int > myBottomRightPoint, ColorValue newColorValue, bool fillSurface) |
static void | DrawRectangle (Image *pImageInOut, common::RectangularROI< int > rroi, ColorValue newColorValue, bool fillSurface) |
static void | DrawDisk (Image *pImageInOut, common::Point< int > myCenterPoint, double radius, ColorValue newColor=ColorValue(255, 0, 0, TYPE_RGB)) |
static void | DrawDisk (ArrayGrid< double > *pGridInOut, common::Point< int > myCenterPoint, double radius, double newValue) |
static void | Plot8CirclePoints (Image *pImage, int xCenter, int yCenter, int x, int y, ColorValue cv) |
static void | DrawCircle (Image *pImageInOut, common::Point< int > myCenterPoint, double radius, ColorValue newColor=ColorValue(255, 0, 0, TYPE_RGB)) |
static void | DrawPolygon (Image *pImageInOut, common::Polygon myPolygon, ColorValue newColor) |
static void | DrawPolygon (ArrayGrid< double > *pGridInOut, common::Polygon myPolygon, double newValue) |
static std::vector< common::Point< int > > | DrawLine (Image *pImageInOut, int xStart, int xStop, int yStart, int yStop, ColorValue newColor=ColorValue(255, 0, 0, TYPE_RGB)) |
static std::vector< common::Point< int > > | DrawLine (Image *pImageInOut, common::Point< int > startPoint, common::Point< int > stopPoint, ColorValue newColor=ColorValue(255, 0, 0, TYPE_RGB)) |
static std::vector< common::Point< int > > | DrawLine (ArrayGrid< double > *pGridInOut, common::Point< int > startPoint, common::Point< int > stopPoint, double newValue) |
static void | DrawArrow (Image *pImage, common::Point< int > p, common::Point< int > q, ColorValue cv, const float scale=0.2) |
static void | DrawPoint (Image *pImageInOut, int x, int y, ColorValue newColor) |
static void | DrawPoint (Image *pImageInOut, common::Point< int > myPoint, ColorValue newColor) |
static void | DrawPoint (ArrayGrid< double > *pGridInOut, common::Point< int > myPoint, double newValue) |
static void | DrawPoint (ArrayGrid< double > *pGridInOut, int x, int y, double newValue) |
static void | DrawPoints (ArrayGrid< double > *pGridInOut, std::vector< common::Point< int > > vPoints, double newValue) |
static void | DrawPoints (Image *pImageInOut, std::vector< common::Point< int > > vPoints, ColorValue newColor) |
static Image * | DrawBoolOnInput (ArrayGrid< double > *pGrid, ArrayGrid< bool > *pGridBool, ColorValue cv=ColorValue(255, 0, 0, TYPE_RGB)) |
Class with operations on image objects; This class draws within an existing image without creating a new image object.
|
static |
Creates a greyscale image with color points where pGridBool has value true
pGrid | input grid on which the greyscale image will be based |
pGridBool | the boolean mask of points to draw in the specified color |
cv | the color value to use to draw the points with value "true" in the pGridBool |
References stira::imagedata::Image::AddBand(), stira::imagedata::ArrayGrid< T >::Clone(), stira::imagedata::ArrayGrid< T >::GetHeight(), stira::imagedata::ArrayGrid< T >::GetValue(), stira::imagedata::ArrayGrid< T >::GetWidth(), and stira::imagedata::Image::SetColor().
|
static |
Draws a circle contour of given color in an image Reference: http://www.tutorialspoint.com/computer_graphics/circle_generation_algorithm.htm
pImageInOut | image to draw on |
myCenterPoint | central point of circle to draw |
radius | radius of circle to draw |
newColor | color of circle |
References stira::common::Point< T >::x, and stira::common::Point< T >::y.
|
static |
Draws a filled disk of given color in an image
pImageInOut | image to draw on |
myCenterPoint | central point of circle to draw |
radius | radius of circle to draw |
newColor | color of circle |
References stira::common::Point< T >::x, and stira::common::Point< T >::y.
|
static |
Draws a filled disk of given color in an ArrayGrid
pGridInOut | grid to draw on |
myCenterPoint | central point of circle to draw |
radius | radius of circle to draw |
newValue | value of pixels inside the circle |
References stira::common::Point< T >::x, and stira::common::Point< T >::y.
|
static |
Draws a line of given color in an image
pImageInOut | image to draw on |
xStart | x coordinate of start point on line to draw |
xStop | x coordinate of stop point on line to draw |
yStart | y coordinate of start point on line to draw |
yStop | y coordinate of stop point on line to draw |
newColor | color of line |
References stira::common::DrawFigures::BresenhamDrawLine().
Referenced by DrawLine(), and stira::imageanalysis::HOG::VisualizeHogDescriptor().
|
static |
Draws a line of given color in an image
pImageInOut | image to draw on |
startPoint | start point of line to draw |
stopPoint | stop point of line to draw |
newColor | color of line |
References stira::common::Point< T >::x, and stira::common::Point< T >::y.
|
static |
Draws a line of given color in an image
pImageInOut | image to draw on |
startPoint | start point of line to draw |
stopPoint | stop point of line to draw |
newColor | color of line |
References stira::common::DrawFigures::BresenhamDrawLine(), DrawLine(), stira::common::Point< T >::x, and stira::common::Point< T >::y.
|
static |
Draws a point of given color in an image
pImageInOut | image to draw on |
x | x coordinate of point |
y | y coordinate of point |
newColor | color to draw point in |
References stira::imagedata::Image::SetColor().
|
static |
Draws a point of given color in an image
pImageInOut | image to draw on |
myPoint | point to draw |
newColor | color to draw point in |
References stira::common::Point< T >::x, and stira::common::Point< T >::y.
|
static |
Draws a point of given color in an ArrayGrid
pGridInOut | grid to draw on |
myPoint | point to draw |
newValue | intensity to draw point in |
References stira::imagedata::ArrayGrid< T >::SetValue().
|
static |
Draws a point of given color in an ArrayGrid
pGridInOut | grid to draw on |
x | x coordinate of point to draw |
y | y coordinate of point to draw |
newValue | intensity to draw point in |
References stira::imagedata::ArrayGrid< T >::SetValue().
|
static |
Draws a vector of points of given color in an image
pGridInOut | grid to draw on |
vPoints | vector of points to draw |
newValue | new value to set for the selected points |
References stira::imagedata::ArrayGrid< T >::SetValue().
|
static |
Draws a vector of points of given color in an image
pImageInOut | image to draw on |
vPoints | vector of points to draw |
newColor | color of square |
|
static |
Draws a polygon contour of given color in an image
pImageInOut | image to draw on |
myPolygon | polygon object to draw |
newColor | color of polygon |
References stira::common::Polygon::GetNumberOfVertices(), stira::common::Polygon::GetVertex(), stira::common::Point< T >::x, and stira::common::Point< T >::y.
|
static |
Draws a polygon contour of given intensity on grid
pGridInOut | grid to draw on |
myPolygon | polygon object to draw |
newValue | value of polygon lines |
References stira::common::Polygon::GetNumberOfVertices(), and stira::common::Polygon::GetVertexInt().
|
static |
Draws a rectangle of given intensity on grid
pGridInOut | grid to draw on |
myTopLeftPoint | top left point of rectangle to draw |
myBottomRightPoint | bottom right point of rectangle to draw |
newValue | value to set inside the rectangle |
fillSurface | flag whether or not the rectangle should be filled; if false, only the circumference is drawn |
References stira::imagedata::ArrayGrid< T >::SetValue(), stira::common::Point< T >::x, and stira::common::Point< T >::y.
Referenced by stira::imageanalysis::HOG::VisualizeHogDescriptor().
|
static |
Draws a rectangle of given intensity on grid
pGridInOut | grid to draw on |
rroi | rectangle ROI to draw |
newValue | value to set inside the rectangle |
fillSurface | flag whether or not the rectangle should be filled; if false, only the circumference is drawn |
References stira::common::RectangularROI< T >::GetBottomRightCorner(), and stira::common::RectangularROI< T >::GetTopLeftCorner().
|
static |
Draws a rectangle of given color (all bands same value) on an image
pGridInOut | grid to draw on |
myTopLeftPoint | top left point of rectangle to draw |
myBottomRightPoint | bottom right point of rectangle to draw |
newValue | value to set inside the rectangle |
fillSurface | flag whether or not the rectangle should be filled; if false, only the circumference is drawn |
References stira::imagedata::Image::GetBands(), and stira::imagedata::Image::GetNumberOfBands().
|
static |
Draws a rectangle of given color (all bands same value) on an image
pImageInOut | image to draw on |
rroi | rectangle ROI to draw |
newValue | value to set inside the rectangle |
fillSurface | flag whether or not the rectangle should be filled; if false, only the circumference is drawn |
References stira::imagedata::Image::GetBands(), and stira::imagedata::Image::GetNumberOfBands().
|
static |
Draws a rectangle of given color on an image
pImageInOut | image to draw on |
myTopLeftPoint | top left point of rectangle to draw |
myBottomRightPoint | bottom right point of rectangle to draw |
newColorValue | color to set inside the rectangle |
fillSurface | flag whether or not the rectangle should be filled; if false, only the circumference is drawn |
References stira::imagedata::ColorValue::c, stira::imagedata::Image::GetBands(), and stira::imagedata::Image::GetNumberOfBands().
|
static |
Draws a rectangle of given color on an image
pImageInOut | image to draw on |
rroi | rectangle ROI to draw |
newColorValue | color to set inside the rectangle |
fillSurface | flag whether or not the rectangle should be filled; if false, only the circumference is drawn |
References stira::imagedata::ColorValue::c, stira::imagedata::Image::GetBands(), and stira::imagedata::Image::GetNumberOfBands().
|
static |
Draws a square of given color in an image
pImageInOut | image to draw on |
myCenterPoint | central point of square to draw |
halfLength | half of side of square to draw |
newColor | color of square |
References stira::common::Point< T >::x, and stira::common::Point< T >::y.
|
static |
Helper function for the DrawCircle method if (a,b) is on the circle, then also (-a,b), (a,-b), (-a,-b), (b,a), (-b,a), (b,-a), (-b,-a) are on that circle Reference: http://www.tutorialspoint.com/computer_graphics/circle_generation_algorithm.htm
pImageInOut | image to draw on |
xCenter | x coordinate of central point of circle to draw |
yCenter | y coordinate of central point of circle to draw |
x | x coordinate of point on circle |
y | y coordinate of point on circle |
cv | color to draw circle points in |
References stira::imagedata::Image::SetColor().