41 #include <visp/vpConfig.h>
43 #ifndef DOXYGEN_SHOULD_SKIP_THIS
45 #include <visp/vpPlotCurve.h>
46 #include <visp/vpDisplayOpenCV.h>
47 #include <visp/vpDisplayX.h>
48 #include <visp/vpDisplayGDI.h>
49 #include <visp/vpDisplayGTK.h>
50 #include <visp/vpDisplayD3D.h>
52 #if defined(VISP_HAVE_DISPLAY)
53 vpPlotCurve::vpPlotCurve() :
54 color(
vpColor::red), curveStyle(point), thickness(1), nbPoint(0), lastPoint(),
55 pointListx(), pointListy(), pointListz(), xmin(0), xmax(0), ymin(0), ymax(0)
59 vpPlotCurve::~vpPlotCurve()
75 #if defined (VISP_HAVE_DISPLAY)
81 if (iP.
get_i() <= lastPoint.get_i()) {top = iP.
get_i()-5; height = lastPoint.get_i() - top+10;}
82 else {top = lastPoint.get_i()-5; height = iP.
get_i() - top+10;}
83 if (iP.
get_j() <= lastPoint.get_j()) {left = iP.
get_j()-5; width = lastPoint.get_j() - left+10;}
84 else {left = lastPoint.get_j()-5; width = iP.
get_j() - left+10;}
88 pointListx.push_back(x);
89 pointListy.push_back(y);
90 pointListz.push_back(0.0);
94 vpPlotCurve::plotList(
const vpImage<unsigned char> &I,
const double xorg,
const double yorg,
const double zoomx,
const double zoomy)
96 std::list<double>::const_iterator it_ptListx = pointListx.begin();
97 std::list<double>::const_iterator it_ptListy = pointListy.begin();
103 iP.
set_ij(yorg-(zoomy*(*it_ptListy)),xorg+(zoomx*(*it_ptListx)));
Class to define colors available for display functionnalities.
Defines a rectangle in the plane.
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 ...
virtual void displayLine(const vpImagePoint &ip1, const vpImagePoint &ip2, const vpColor &color, unsigned int thickness=1)=0
void set_ij(const double ii, const double jj)