TBTK
TBTK::Plot::PlotCanvas Class Reference

Public Member Functions

 PlotCanvas ()
 
 ~PlotCanvas ()
 
void setWidth (unsigned int width)
 
void setHeight (unsigned int height)
 
void setPadding (double paddingLeft, double paddingRight, double paddingBottom, double paddingTop)
 
void setBoundsX (double minX, double maxX)
 
void setBoundsY (double minY, double maxY)
 
void setBounds (double minX, double maxX, double minY, double maxY)
 
double getMinX () const
 
double getMaxX () const
 
double getMinY () const
 
double getMaxY () const
 
void setLabelX (const std::string &labelX)
 
void setLabelY (const std::string &labelY)
 
void setShowColorBox (bool showColorBox)
 
bool getShowColorBox () const
 
void setBoundsColor (double minColor, double maxColor)
 
void setCanvas (cv::Mat &canvas)
 
const cv::Mat & getCanvas () const
 
void clear ()
 
void setPixel (unsigned int x, unsigned int y, unsigned char red, unsigned char green, unsigned char blue)
 
void drawLine (double x0, double y0, double x1, double y1, const std::vector< unsigned char > &color, unsigned int width)
 
void drawCircle (double x, double y, unsigned int size, const std::vector< unsigned char > &color)
 
void save (std::string filename) const
 
cv::Point getCVPoint (double x, double y) const
 
void drawAxes ()
 

Constructor & Destructor Documentation

TBTK::Plot::PlotCanvas::PlotCanvas ( )

Constructor.

TBTK::Plot::PlotCanvas::~PlotCanvas ( )

Destructor.

Member Function Documentation

void TBTK::Plot::PlotCanvas::clear ( )
inline

Clear plot.

void TBTK::Plot::PlotCanvas::drawAxes ( )

Draw axes.

void TBTK::Plot::PlotCanvas::drawCircle ( double  x,
double  y,
unsigned int  size,
const std::vector< unsigned char > &  color 
)
inline

Draw circle.

void TBTK::Plot::PlotCanvas::drawLine ( double  x0,
double  y0,
double  x1,
double  y1,
const std::vector< unsigned char > &  color,
unsigned int  width 
)
inline

Draw line.

const cv::Mat & TBTK::Plot::PlotCanvas::getCanvas ( ) const
inline

Get canvas.

cv::Point TBTK::Plot::PlotCanvas::getCVPoint ( double  x,
double  y 
) const
inline

Converts a coordinate to a cvPoint that can be used as canvas /coordinate.

double TBTK::Plot::PlotCanvas::getMaxX ( ) const
inline

Get maximum X-value.

double TBTK::Plot::PlotCanvas::getMaxY ( ) const
inline

Get maximum Y-value.

double TBTK::Plot::PlotCanvas::getMinX ( ) const
inline

Get minimum X-value.

double TBTK::Plot::PlotCanvas::getMinY ( ) const
inline

Get minimum Y-value.

bool TBTK::Plot::PlotCanvas::getShowColorBox ( ) const
inline

Set color box.

void TBTK::Plot::PlotCanvas::save ( std::string  filename) const
inline

Save canvas to file.

void TBTK::Plot::PlotCanvas::setBounds ( double  minX,
double  maxX,
double  minY,
double  maxY 
)
inline

Set bounds.

void TBTK::Plot::PlotCanvas::setBoundsColor ( double  minColor,
double  maxColor 
)
inline

Set color box bounds.

void TBTK::Plot::PlotCanvas::setBoundsX ( double  minX,
double  maxX 
)
inline

Set bounds.

void TBTK::Plot::PlotCanvas::setBoundsY ( double  minY,
double  maxY 
)
inline

Set bounds.

void TBTK::Plot::PlotCanvas::setCanvas ( cv::Mat &  canvas)
inline

Set canvas.

void TBTK::Plot::PlotCanvas::setHeight ( unsigned int  height)
inline

Set height.

void TBTK::Plot::PlotCanvas::setLabelX ( const std::string &  labelX)
inline

Set x-label.

void TBTK::Plot::PlotCanvas::setLabelY ( const std::string &  labelY)
inline

Set y-label.

void TBTK::Plot::PlotCanvas::setPadding ( double  paddingLeft,
double  paddingRight,
double  paddingBottom,
double  paddingTop 
)
inline

Set padding.

void TBTK::Plot::PlotCanvas::setPixel ( unsigned int  x,
unsigned int  y,
unsigned char  red,
unsigned char  green,
unsigned char  blue 
)
inline

Set pixel.

void TBTK::Plot::PlotCanvas::setShowColorBox ( bool  showColorBox)
inline

Set color box.

void TBTK::Plot::PlotCanvas::setWidth ( unsigned int  width)
inline

Set width.


The documentation for this class was generated from the following file: