34 #include <visp3/core/vpConfig.h>
36 #ifndef DOXYGEN_SHOULD_SKIP_THIS
38 #include <visp3/gui/vpDisplayD3D.h>
39 #include <visp3/gui/vpDisplayGDI.h>
40 #include <visp3/gui/vpDisplayGTK.h>
41 #include <visp3/gui/vpDisplayOpenCV.h>
42 #include <visp3/gui/vpDisplayX.h>
43 #include <visp3/gui/vpPlotCurve.h>
45 #if defined(VISP_HAVE_DISPLAY)
49 vpPlotCurve::vpPlotCurve()
50 : color(
vpColor::red), curveStyle(point), thickness(1), nbPoint(0), lastPoint(), pointListx(), pointListy(),
51 pointListz(), legend(), xmin(0), xmax(0), ymin(0), ymax(0)
54 vpPlotCurve::~vpPlotCurve()
68 #if defined(VISP_HAVE_DISPLAY)
74 if (iP.
get_i() <= lastPoint.get_i()) {
76 height = lastPoint.get_i() - top + 10;
79 top = lastPoint.get_i() - 5;
80 height = iP.
get_i() - top + 10;
82 if (iP.
get_j() <= lastPoint.get_j()) {
83 left = iP.
get_j() - 5;
84 width = lastPoint.get_j() - left + 10;
87 left = lastPoint.get_j() - 5;
88 width = iP.
get_j() - left + 10;
93 pointListx.push_back(x);
94 pointListy.push_back(y);
95 pointListz.push_back(0.0);
98 void vpPlotCurve::plotList(
const vpImage<unsigned char> &I,
double xorg,
double yorg,
double zoomx,
double zoomy)
100 std::list<double>::const_iterator it_ptListx = pointListx.begin();
101 std::list<double>::const_iterator it_ptListy = pointListy.begin();
105 while (k < nbPoint) {
106 iP.
set_ij(yorg - (zoomy * (*it_ptListy)), xorg + (zoomx * (*it_ptListx)));
121 #elif !defined(VISP_BUILD_SHARED_LIBS)
123 void dummy_vpPlotCurve() { };
Class to define RGB colors available for display functionalities.
static void displayLine(const vpImage< unsigned char > &I, const vpImagePoint &ip1, const vpImagePoint &ip2, const vpColor &color, unsigned int thickness=1, bool segment=true)
static void flushROI(const vpImage< unsigned char > &I, const vpRect &roi)
Class that defines a 2D point in an image. This class is useful for image processing and stores only ...
void set_ij(double ii, double jj)
Defines a rectangle in the plane.