35#include <visp3/core/vpConfig.h>
37#ifndef DOXYGEN_SHOULD_SKIP_THIS
39#include <visp3/gui/vpDisplayD3D.h>
40#include <visp3/gui/vpDisplayGDI.h>
41#include <visp3/gui/vpDisplayGTK.h>
42#include <visp3/gui/vpDisplayOpenCV.h>
43#include <visp3/gui/vpDisplayX.h>
44#include <visp3/gui/vpPlotCurve.h>
46#if defined(VISP_HAVE_DISPLAY)
47vpPlotCurve::vpPlotCurve()
48 : color(
vpColor::red), curveStyle(point), thickness(1), nbPoint(0), lastPoint(), pointListx(), pointListy(),
49 pointListz(), legend(), xmin(0), xmax(0), ymin(0), ymax(0)
53vpPlotCurve::~vpPlotCurve()
67#if defined(VISP_HAVE_DISPLAY)
73 if (iP.
get_i() <= lastPoint.get_i()) {
75 height = lastPoint.get_i() - top + 10;
77 top = lastPoint.get_i() - 5;
78 height = iP.
get_i() - top + 10;
80 if (iP.
get_j() <= lastPoint.get_j()) {
81 left = iP.
get_j() - 5;
82 width = lastPoint.get_j() - left + 10;
84 left = lastPoint.get_j() - 5;
85 width = iP.
get_j() - left + 10;
90 pointListx.push_back(x);
91 pointListy.push_back(y);
92 pointListz.push_back(0.0);
95void vpPlotCurve::plotList(
const vpImage<unsigned char> &I,
double xorg,
double yorg,
double zoomx,
double zoomy)
97 std::list<double>::const_iterator it_ptListx = pointListx.begin();
98 std::list<double>::const_iterator it_ptListy = pointListy.begin();
102 while (k < nbPoint) {
103 iP.
set_ij(yorg - (zoomy * (*it_ptListy)), xorg + (zoomx * (*it_ptListx)));
116#elif !defined(VISP_BUILD_SHARED_LIBS)
119void 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)
Definition of the vpImage class member functions.
Defines a rectangle in the plane.