Basic Image AlgorithmS Library  2.8.0
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
Public Types | Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
BIAS::DataPlot Class Reference

Class to plot data as lines, crosses etc, as gnuplot does, duplicates functionality in class GraphPlotter. More...

#include <Utils/DataPlot.hh>

+ Collaboration diagram for BIAS::DataPlot:

Public Types

enum  DrawingStyle { Points, Lines, Cross }
 

Public Member Functions

void Clear ()
 
void CutLinePlot ()
 
 DataPlot (Image< unsigned char > &PlotArea)
 
void DrawXAxis ()
 
void DrawYAxis ()
 
void Plot (const std::vector< float > &data)
 
void Plot (const std::vector< float > &x, const std::vector< float > &y)
 
int Plot (float x, float y)
 draw single value, no AutoRange possible More...
 
void SetAutoRange (bool x, bool y)
 
void SetBGColour (ColourRGB< unsigned char > color)
 
void SetDrawingStyle (enum DrawingStyle)
 
void SetPenColour (ColourRGB< unsigned char > color)
 
void SetThickness (unsigned int t)
 
void SetXRange (float min, float max)
 
void SetYRange (float min, float max)
 
 ~DataPlot ()
 

Protected Member Functions

void DrawLine_ (unsigned int x, unsigned int y, unsigned int x2, unsigned int y2)
 
int WindowToViewport_ (float wx, float wy, unsigned int &vx, unsigned int &vy)
 

Protected Attributes

bool AutoRangeX_
 
bool AutoRangeY_
 
ColourRGB< unsigned char > BGColour_
 
unsigned int BorderX_
 
unsigned int BorderY_
 
unsigned char ChannelCount_
 
unsigned char ** DrawIda_
 
DrawingStyle DrawStyle_
 
int LastVX_
 
int LastVY_
 
float MaxX_
 
float MaxY_
 
float MinX_
 
float MinY_
 
ColourRGB< unsigned char > PenColour_
 
Image< unsigned char > * PlotArea_
 
unsigned int PlotAreaHeight_
 
unsigned int PlotAreaWidth_
 
int Thickness_
 

Detailed Description

Class to plot data as lines, crosses etc, as gnuplot does, duplicates functionality in class GraphPlotter.

Author
evers
Date
April 2009
Examples:
ExampleDataPlot.cpp.

Definition at line 42 of file DataPlot.hh.

Member Enumeration Documentation

Enumerator
Points 
Lines 
Cross 

Definition at line 47 of file DataPlot.hh.

Constructor & Destructor Documentation

DataPlot::DataPlot ( Image< unsigned char > &  PlotArea)

Definition at line 32 of file DataPlot.cpp.

References BIAS::ImageBase::GetChannelCount(), and BIAS::ImageBase::GetWidth().

DataPlot::~DataPlot ( )

Definition at line 50 of file DataPlot.cpp.

Member Function Documentation

void DataPlot::Clear ( )
Examples:
ExampleDataPlot.cpp.

Definition at line 189 of file DataPlot.cpp.

void DataPlot::CutLinePlot ( )

Definition at line 183 of file DataPlot.cpp.

void DataPlot::DrawLine_ ( unsigned int  x,
unsigned int  y,
unsigned int  x2,
unsigned int  y2 
)
protected

Definition at line 215 of file DataPlot.cpp.

References BIAS::ImageDraw< StorageType >::Line().

void DataPlot::DrawXAxis ( )
Examples:
ExampleDataPlot.cpp.

Definition at line 83 of file DataPlot.cpp.

void DataPlot::DrawYAxis ( )
Examples:
ExampleDataPlot.cpp.

Definition at line 94 of file DataPlot.cpp.

void DataPlot::Plot ( const std::vector< float > &  data)
Examples:
ExampleDataPlot.cpp.

Definition at line 103 of file DataPlot.cpp.

void DataPlot::Plot ( const std::vector< float > &  x,
const std::vector< float > &  y 
)

Definition at line 121 of file DataPlot.cpp.

int DataPlot::Plot ( float  x,
float  y 
)

draw single value, no AutoRange possible

Returns
0 for success, -1 for x out of range, -2 for y out of range

Definition at line 144 of file DataPlot.cpp.

void DataPlot::SetAutoRange ( bool  x,
bool  y 
)
Examples:
ExampleDataPlot.cpp.

Definition at line 77 of file DataPlot.cpp.

void BIAS::DataPlot::SetBGColour ( ColourRGB< unsigned char >  color)
inline
Examples:
ExampleDataPlot.cpp.

Definition at line 75 of file DataPlot.hh.

void DataPlot::SetDrawingStyle ( enum DrawingStyle  style)
Examples:
ExampleDataPlot.cpp.

Definition at line 54 of file DataPlot.cpp.

void BIAS::DataPlot::SetPenColour ( ColourRGB< unsigned char >  color)
inline
Examples:
ExampleDataPlot.cpp.

Definition at line 77 of file DataPlot.hh.

void BIAS::DataPlot::SetThickness ( unsigned int  t)
inline
Examples:
ExampleDataPlot.cpp.

Definition at line 61 of file DataPlot.hh.

void DataPlot::SetXRange ( float  min,
float  max 
)
Examples:
ExampleDataPlot.cpp.

Definition at line 63 of file DataPlot.cpp.

void DataPlot::SetYRange ( float  min,
float  max 
)
Examples:
ExampleDataPlot.cpp.

Definition at line 70 of file DataPlot.cpp.

int DataPlot::WindowToViewport_ ( float  wx,
float  wy,
unsigned int &  vx,
unsigned int &  vy 
)
protected

Definition at line 198 of file DataPlot.cpp.

Member Data Documentation

bool BIAS::DataPlot::AutoRangeX_
protected

Definition at line 89 of file DataPlot.hh.

bool BIAS::DataPlot::AutoRangeY_
protected

Definition at line 89 of file DataPlot.hh.

ColourRGB<unsigned char > BIAS::DataPlot::BGColour_
protected

Definition at line 99 of file DataPlot.hh.

unsigned int BIAS::DataPlot::BorderX_
protected

Definition at line 90 of file DataPlot.hh.

unsigned int BIAS::DataPlot::BorderY_
protected

Definition at line 90 of file DataPlot.hh.

unsigned char BIAS::DataPlot::ChannelCount_
protected

Definition at line 93 of file DataPlot.hh.

unsigned char** BIAS::DataPlot::DrawIda_
protected

Definition at line 92 of file DataPlot.hh.

DrawingStyle BIAS::DataPlot::DrawStyle_
protected

Definition at line 96 of file DataPlot.hh.

int BIAS::DataPlot::LastVX_
protected

Definition at line 100 of file DataPlot.hh.

int BIAS::DataPlot::LastVY_
protected

Definition at line 100 of file DataPlot.hh.

float BIAS::DataPlot::MaxX_
protected

Definition at line 88 of file DataPlot.hh.

float BIAS::DataPlot::MaxY_
protected

Definition at line 88 of file DataPlot.hh.

float BIAS::DataPlot::MinX_
protected

Definition at line 88 of file DataPlot.hh.

float BIAS::DataPlot::MinY_
protected

Definition at line 88 of file DataPlot.hh.

ColourRGB<unsigned char > BIAS::DataPlot::PenColour_
protected

Definition at line 99 of file DataPlot.hh.

Image<unsigned char >* BIAS::DataPlot::PlotArea_
protected

Definition at line 91 of file DataPlot.hh.

unsigned int BIAS::DataPlot::PlotAreaHeight_
protected

Definition at line 94 of file DataPlot.hh.

unsigned int BIAS::DataPlot::PlotAreaWidth_
protected

Definition at line 94 of file DataPlot.hh.

int BIAS::DataPlot::Thickness_
protected

Definition at line 97 of file DataPlot.hh.


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