Public Member Functions | Protected Attributes

DGVPlotVTK Class Reference

This class represents the DGV Plot Display object using VTK. WORK IN PROGESS. More...

#include <DGVPlotVTK.h>

List of all members.

Public Member Functions

 DGVPlotVTK (QWidget *parent=0)
 Constructor.
virtual ~DGVPlotVTK ()
 Destructor.
void setName (QString filename)
 Gives the plot a new name.
void setData (vtkImageData *data)
 Adds the data to the plot ready to be generated. Call this before generatePlot().
void setRanges (double xmin, double xmax, double ymin, double ymax)
 Sets the range of the plot of the data. If ranges for each dimension is the same, it will be computed automatically.
void generatePlot ()
 Generates the actual plot so it can be displayed. Call this after data and its ranges have been set.
QString strippedName ()
 Returns the stripped (path removed) name of the image.
QString strippedNamePrefix ()
 Returns the stripped (path removed) name of the image with "Plot" prefix.

Protected Attributes

QString name
 Name of the Image.
bool loaded
 Is the data loaded?
vtkXYPlotActor * plotActor
 Plot handler.
vtkRenderer * renderer
 Renderer of the plot.
vtkRenderWindow * renderWin
 Window that controls the renderer.

Detailed Description

This class represents the DGV Plot Display object using VTK. WORK IN PROGESS.

Author:
Shekhar S. Chandra, 2009

The class displays X-Y plots from values using OpenGL via the VTK library. The rendering is encapsulated within a QVTK widget.

Usage Example:

    DGVPlotVTK *plot = new DGVPlotVTK(this);

    plot->setData(hist->GetOutput());
    plot->generatePlot();
    plot->show();

Definition at line 50 of file DGVPlotVTK.h.


Constructor & Destructor Documentation

DGVPlotVTK::DGVPlotVTK ( QWidget *  parent = 0  ) 

Constructor.

Definition at line 5 of file DGVPlotVTK.cpp.

DGVPlotVTK::~DGVPlotVTK (  )  [virtual]

Destructor.

Definition at line 12 of file DGVPlotVTK.cpp.


Member Function Documentation

void DGVPlotVTK::generatePlot (  ) 

Generates the actual plot so it can be displayed. Call this after data and its ranges have been set.

Definition at line 38 of file DGVPlotVTK.cpp.

void DGVPlotVTK::setData ( vtkImageData *  data  ) 

Adds the data to the plot ready to be generated. Call this before generatePlot().

Definition at line 26 of file DGVPlotVTK.cpp.

void DGVPlotVTK::setName ( QString  filename  ) 

Gives the plot a new name.

Definition at line 19 of file DGVPlotVTK.cpp.

void DGVPlotVTK::setRanges ( double  xmin,
double  xmax,
double  ymin,
double  ymax 
)

Sets the range of the plot of the data. If ranges for each dimension is the same, it will be computed automatically.

Definition at line 32 of file DGVPlotVTK.cpp.

QString DGVPlotVTK::strippedName (  ) 

Returns the stripped (path removed) name of the image.

Definition at line 60 of file DGVPlotVTK.cpp.

QString DGVPlotVTK::strippedNamePrefix (  ) 

Returns the stripped (path removed) name of the image with "Plot" prefix.

Definition at line 65 of file DGVPlotVTK.cpp.


Member Data Documentation

bool DGVPlotVTK::loaded [protected]

Is the data loaded?

Definition at line 100 of file DGVPlotVTK.h.

QString DGVPlotVTK::name [protected]

Name of the Image.

Definition at line 99 of file DGVPlotVTK.h.

vtkXYPlotActor* DGVPlotVTK::plotActor [protected]

Plot handler.

Definition at line 102 of file DGVPlotVTK.h.

vtkRenderer* DGVPlotVTK::renderer [protected]

Renderer of the plot.

Definition at line 104 of file DGVPlotVTK.h.

vtkRenderWindow* DGVPlotVTK::renderWin [protected]

Window that controls the renderer.

Definition at line 105 of file DGVPlotVTK.h.


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