
Definition in file DrawOps.H.
#include "Util/Types.H"
#include "Image/SimpleFont.H"
#include "Image/Pixels.H"
#include <string>
#include <vector>
Include dependency graph for DrawOps.H:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.
Classes | |
| struct | MeterInfo |
| Simple struct to define a bargraph meter. More... | |
Enumerations | |
| enum | TextAnchor { ANCHOR_TOP_LEFT, ANCHOR_TOP_RIGHT, ANCHOR_BOTTOM_LEFT, ANCHOR_BOTTOM_RIGHT } |
Functions | |
| void | drawTraj (Image< PixRGB< byte > > &img, const Point2D< int > *foas_begin, const Point2D< int > *foas_end) |
| draw the trajectory for the points in foas onto img | |
| Image< PixRGB< byte > > | colGreyCombo (const Image< PixRGB< byte > > &colimg, const Image< float > &bwimg, const bool xcombo, const bool interp=true) |
| build a combo between a color and greyscale image | |
| Image< PixRGB< byte > > | colColCombo (const Image< PixRGB< byte > > &colimg1, const Image< PixRGB< byte > > &colimg2, const bool xcombo, const bool interp=true) |
| build a combo between a color and color image | |
| Image< PixRGB< byte > > | highlightRegions (const Image< PixRGB< byte > > &img, const Image< byte > &mask, const int maxval=320) |
| highlight an image in the regions given by a mask | |
| Image< PixRGB< byte > > | warp3Dmap (const Image< PixRGB< byte > > &img, const Image< float > &hmap, const float pitch, const float yaw, Dims &imdims) |
| warp image onto height map | |
| void | inplaceSetValMask (Image< float > &dest, const Image< byte > &mask, const float val) |
| Set values at all locations where mask is non-zero. | |
| template<class T_or_RGB> | |
| void | drawDisk (Image< T_or_RGB > &dst, const Point2D< int > ¢er, const int radius, const T_or_RGB value) |
| Draws a disk with color "value" in image. | |
| template<class T_or_RGB> | |
| void | drawLine (Image< T_or_RGB > &dst, const Point2D< int > &p1, const Point2D< int > &p2, const T_or_RGB col, const int rad=1) |
| Draw a line from p1 to p2 of color col and pixel radius rad. | |
| template<class T_or_RGB> | |
| void | drawLine (Image< T_or_RGB > &dst, const Point2D< int > &pos, float ori, float len, const T_or_RGB col, const int rad=1) |
| Draw a line at pos angle ori(rad) and length len. | |
| template<class T_or_RGB> | |
| void | drawCorner (Image< T_or_RGB > &dst, const Point2D< int > &pos, float ori, float ang, float len, const T_or_RGB col, const int rad=1) |
| Draw a corner at pos and ori with an ang. | |
| template<class T_or_RGB> | |
| void | drawRect (Image< T_or_RGB > &dst, const Rectangle &rect, const T_or_RGB col, const int rad=1) |
| Draw a rectangle of color col and line width of rad*2, with rounded corners. | |
| template<class T_or_RGB> | |
| void | drawRectSquareCorners (Image< T_or_RGB > &dst, const Rectangle &r, const T_or_RGB color, const int linewidth) |
| Draw a rectangle of the given color and line width, with square corners. | |
| template<class T_or_RGB> | |
| void | drawRectOR (Image< T_or_RGB > &dst, const Rectangle &rect, const T_or_RGB col, const int rad=1, const float ori=0.0F) |
| Draw a rectangle of color col and pixel radius rad, rotate by ori. | |
| template<class T_or_RGB> | |
| void | drawRectEZ (Image< T_or_RGB > &dst, const Rectangle &rect, const T_or_RGB col, const int rad=1) |
| Draw a rectangle of color col and pixel radius rad, no size assertions. | |
| template<class T_or_RGB> | |
| void | drawFilledRect (Image< T_or_RGB > &dst, const Rectangle &rect, const T_or_RGB fillVal) |
| Draw a filled rectangle with the given fill value. | |
| template<class T_or_RGB> | |
| void | drawCross (Image< T_or_RGB > &dst, const Point2D< int > &p, const T_or_RGB col, const int siz=3, const int rad=1) |
| Draw a cross of color col, half-size siz and pixel radius rad. | |
| template<class T_or_RGB> | |
| void | drawCrossOR (Image< T_or_RGB > &dst, const Point2D< int > &p, const T_or_RGB col, const int siz=3, const int rad=1, const float ori=0.0F) |
| Draw a cross of color col, half-size siz and pixel radius rad. | |
| template<class T_or_RGB> | |
| void | drawPatch (Image< T_or_RGB > &dst, const Point2D< int > &p, const int siz, const T_or_RGB col) |
| Draw a square patch of color col and size siz. | |
| template<class T_or_RGB> | |
| void | drawPatchBB (Image< T_or_RGB > &dst, const Point2D< int > &p, const int siz, const T_or_RGB col, const T_or_RGB bgcol=T_or_RGB()) |
| Draw a square patch of color col and size siz, with a black border. | |
| template<class T_or_RGB> | |
| void | drawCircle (Image< T_or_RGB > &dst, const Point2D< int > &p, const int radius, const T_or_RGB col, const int rad=1) |
| Draw a circle of color col and radius radius, with pixel radius rad. | |
| template<class T_or_RGB> | |
| void | drawArrow (Image< T_or_RGB > &dst, const Point2D< int > &p1, const Point2D< int > &p2, const T_or_RGB col, const int rad=1) |
| Draw an arrow from p1 to p2 with pixel radius rad. | |
| template<class T_or_RGB> | |
| void | drawGrid (Image< T_or_RGB > &dst, const int spacingX, const int spacingY, const int thickX, const int thickY, const T_or_RGB col) |
| Draw a grid. | |
| template<class T_or_RGB> | |
| void | drawGrid (Image< T_or_RGB > &dst, const uint nx, const uint ny, const int thick, const T_or_RGB col) |
| Draw an nx * ny grid that exactly partitions the given image. | |
| template<class T, class T_or_RGB> | |
| void | drawContour2D (const Image< T > &src, Image< T_or_RGB > &dst, const T_or_RGB &col, const byte rad) |
| Draw a 2D contour. | |
| template<class T_or_RGB> | |
| void | writeText (Image< T_or_RGB > &dst, const Point2D< int > &pt, const char *text, const T_or_RGB col=T_or_RGB(), const T_or_RGB bgcol=T_or_RGB(255), const SimpleFont &f=SimpleFont::FIXED(10), const bool transparent_bg=false, const TextAnchor anchor=ANCHOR_TOP_LEFT) |
| Write some text in normal font; only ASCII chars 32 .. 126 are supported. | |
| template<class T_or_RGB> | |
| Image< T_or_RGB > | makeMultilineTextBox (const int w, const std::string *lines, const size_t nlines, const T_or_RGB col, const T_or_RGB bg=T_or_RGB(), const size_t max_chars_per_line=0, const int fontwidth=0) |
| Make an image containing one or more lines of text. | |
| template<class T_or_RGB> | |
| void | drawPoint (Image< T_or_RGB > &dst, int X, int Y, T_or_RGB pix) |
| draw a dot which is a point with 4 connected points | |
| template<class T> | |
| int | drawDiskCheckTarget (Image< T > &dst, Image< T > &mask, const Point2D< int > ¢er, const int radius, const T value, const T targetval, const T floodval) |
| Draws a disk in image and check if it hits a target. | |
| template<class T> | |
| Image< PixRGB< T > > | warp3D (const Image< PixRGB< T > > &ima, const Image< float > &zmap, const float pitch, const float yaw, const float zMax, Dims &dims) |
| Warp image in 3D onto z-map. | |
| Image< PixRGB< byte > > | formatMapForDisplay (const Image< float > &img, const float factor, const Dims &newdims, const bool useInterp, const ColorMap &cmap, const bool showColorScale, const char *label) |
| Format a feature map for display. | |
| template<typename T, class U> | |
| Image< PixRGB< byte > > | linePlot (const U &points, const int w, const int h, T minVal=T(), T maxVal=T(), const char *title="", const char *xLabel="", const char *yLabel="", const PixRGB< byte > &linecol=PixRGB< byte >(0, 0, 0), const PixRGB< byte > &bckcol=PixRGB< byte >(255, 255, 255)) |
| Generate a plot from a vector of points. | |
| template<class T_or_RGB> | |
| void | drawFilledPolygon (Image< T_or_RGB > &img, const std::vector< Point2D< int > > &polygon, const T_or_RGB col) |
| Draw a filled polygon with color col inside the polygon, no change outside. | |
| Image< PixRGB< byte > > | drawMeters (const MeterInfo *infos, const size_t ninfo, const size_t nx, const Dims &meterdims) |
| Draw some bargraph meters. | |
|
||||||||||||||||||||
|
build a combo between a color and color image
|
|
||||||||||||||||||||
|
build a combo between a color and greyscale image
|
|
||||||||||||||||||||||||||||
|
Draw an arrow from p1 to p2 with pixel radius rad.
|
|
||||||||||||||||||||||||||||
|
Draw a circle of color col and radius radius, with pixel radius rad.
|
|
||||||||||||||||||||||||
|
Draw a 2D contour. Will draw a disk of color col and radius rad in dst at every point where src is on a contour. dst should be initialized ahd have same dims as src. Nothing is drawn for point off contours. |
|
||||||||||||||||||||||||||||||||||||
|
Draw a corner at pos and ori with an ang.
|
|
||||||||||||||||||||||||||||
|
Draw a cross of color col, half-size siz and pixel radius rad.
|
|
||||||||||||||||||||||||||||||||
|
Draw a cross of color col, half-size siz and pixel radius rad.
|
|
||||||||||||||||||||||||
|
Draws a disk with color "value" in image.
|
|
||||||||||||||||||||||||||||||||||||
|
Draws a disk in image and check if it hits a target.
|
|
||||||||||||||||||||
|
Draw a filled polygon with color col inside the polygon, no change outside.
|
|
||||||||||||||||||||
|
Draw a filled rectangle with the given fill value.
|
|
||||||||||||||||||||||||||||
|
Draw an nx * ny grid that exactly partitions the given image.
|
|
||||||||||||||||||||||||||||||||
|
Draw a grid.
|
|
||||||||||||||||||||||||||||||||
|
Draw a line at pos angle ori(rad) and length len.
|
|
||||||||||||||||||||||||||||
|
Draw a line from p1 to p2 of color col and pixel radius rad.
|
|
||||||||||||||||||||
|
Draw some bargraph meters.
Definition at line 1156 of file DrawOps.C. References ASSERT, Image< T >::beginw(), clampValue(), color, SimpleFont::fixedMaxHeight(), Image< T >::getWidth(), Dims::h(), i, MeterInfo::label, sformat(), MeterInfo::thresh, MeterInfo::val, MeterInfo::valmax, SimpleFont::w(), Dims::w(), writeText(), x, y, and ZEROS. Referenced by Nv2UiJob::makeMeters(). |
|
||||||||||||||||||||||||
|
Draw a square patch of color col and size siz.
|
|
||||||||||||||||||||||||||||
|
Draw a square patch of color col and size siz, with a black border.
|
|
||||||||||||||||||||||||
|
draw a dot which is a point with 4 connected points this is between the setVal method and drawCircle method for illustrating points |
|
||||||||||||||||||||||||
|
Draw a rectangle of color col and line width of rad*2, with rounded corners.
|
|
||||||||||||||||||||||||
|
Draw a rectangle of color col and pixel radius rad, no size assertions.
|
|
||||||||||||||||||||||||||||
|
Draw a rectangle of color col and pixel radius rad, rotate by ori.
|
|
||||||||||||||||||||||||
|
Draw a rectangle of the given color and line width, with square corners.
|
|
||||||||||||||||
|
draw the trajectory for the points in foas onto img Yellow circles and red arrows are drawn, connecting the points in foas.
|
|
||||||||||||||||||||||||||||||||
|
Format a feature map for display. Take an Image<float> feature map as input and convert it to PixRGB<byte> by either multiplying the values by a factor or by normalizing them to 0 .. 255 (if factor is 0.0), and then using a given color map (which will also be displayed if showColorScale is true). Then rescale to the specified dims, using interpolation if desired. Then write a descriptor label in the top-left corner using a large font, and finally show the original range of values in the bottom-right corner uing a tiny font. |
|
||||||||||||||||
|
highlight an image in the regions given by a mask
|
|
||||||||||||||||
|
Set values at all locations where mask is non-zero.
|
|
||||||||||||||||||||||||||||||||||||||||||||||||
|
Generate a plot from a vector of points.
|
|
||||||||||||||||||||||||||||||||||||
|
Make an image containing one or more lines of text. The function will choose a font width that fits the desired image size.
|
|
||||||||||||||||||||||||||||||||
|
Warp image in 3D onto z-map.
|
|
||||||||||||||||||||||||
|
warp image onto height map
|
|
||||||||||||||||||||||||||||||||||||||||
|
Write some text in normal font; only ASCII chars 32 .. 126 are supported. See Image/SimpleFont.H for font choices. |
1.4.4