VTK
vtkPlotBag.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkPlotBag.h
5 
6  Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
7  All rights reserved.
8  See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
9 
10  This software is distributed WITHOUT ANY WARRANTY; without even
11  the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
12  PURPOSE. See the above copyright notice for more information.
13 
14 =========================================================================*/
15 
36 #ifndef vtkPlotBag_h
37 #define vtkPlotBag_h
38 
39 #include "vtkChartsCoreModule.h" // For export macro
40 #include "vtkPlotPoints.h"
41 
42 class vtkPen;
43 
44 class VTKCHARTSCORE_EXPORT vtkPlotBag : public vtkPlotPoints
45 {
46 public:
47  vtkTypeMacro(vtkPlotBag, vtkPlotPoints);
48  virtual void PrintSelf(ostream &os, vtkIndent indent);
49 
53  static vtkPlotBag *New();
54 
60  virtual void Update();
61 
65  virtual bool Paint(vtkContext2D *painter);
66 
73  virtual bool PaintLegend(vtkContext2D *painter, const vtkRectf& rect,
74  int legendIndex);
75 
81 
86  virtual vtkStdString GetTooltipLabel(const vtkVector2d &plotPos,
87  vtkIdType seriesIndex,
88  vtkIdType segmentIndex);
89 
91 
98  virtual void SetInputData(vtkTable *table);
99  virtual void SetInputData(vtkTable *table, const vtkStdString &yColumn,
100  const vtkStdString &densityColumn);
101  virtual void SetInputData(vtkTable *table, const vtkStdString &xColumn,
102  const vtkStdString &yColumn,
103  const vtkStdString &densityColumn);
105 
106  virtual void SetInputData(vtkTable *table, vtkIdType xColumn,
107  vtkIdType yColumn,
108  vtkIdType densityColumn);
109 
111 
115  vtkSetMacro(BagVisible, bool);
116  vtkGetMacro(BagVisible, bool);
118 
120 
123  void SetLinePen(vtkPen* pen);
124  vtkGetObjectMacro(LinePen, vtkPen);
126 
132  void SetPointPen(vtkPen* pen) { this->SetPen(pen); }
133  vtkPen* GetPointPen() { return this->GetPen(); }
134 
135 protected:
138 
140 
145 
146 private:
147  vtkPlotBag(const vtkPlotBag &) VTK_DELETE_FUNCTION;
148  void operator=(const vtkPlotBag &) VTK_DELETE_FUNCTION;
149 };
150 
151 #endif //vtkPlotBag_h
vtkPoints2D
represent and manipulate 2D points
Definition: vtkPoints2D.h:37
vtkPlotPoints.h
vtkPlotBag::SetInputData
virtual void SetInputData(vtkTable *table, vtkIdType xColumn, vtkIdType yColumn, vtkIdType densityColumn)
vtkPlotBag::GetLabels
virtual vtkStringArray * GetLabels()
Get the plot labels.
vtkPlotBag::Q3Points
vtkPoints2D * Q3Points
Definition: vtkPlotBag.h:143
vtkIdType
int vtkIdType
Definition: vtkType.h:287
vtkTable
A table, which contains similar-typed columns of data.
Definition: vtkTable.h:69
vtkPlotBag::SetLinePen
void SetLinePen(vtkPen *pen)
Set/get the vtkPen object that controls how this plot draws boundary lines.
vtkContext2D
Class for drawing 2D primitives to a graphical context.
Definition: vtkContext2D.h:58
vtkPlotBag::GetPointPen
vtkPen * GetPointPen()
Definition: vtkPlotBag.h:133
vtkDataArray
abstract superclass for arrays of numeric data
Definition: vtkDataArray.h:55
vtkPlotBag::PrintSelf
virtual void PrintSelf(ostream &os, vtkIndent indent)
Methods invoked by print to print information about the object including superclasses.
vtkVector2d
Definition: vtkVector.h:347
vtkPlot::SetPen
void SetPen(vtkPen *pen)
Set/get the vtkPen object that controls how this plot draws (out)lines.
vtkPlotBag::Paint
virtual bool Paint(vtkContext2D *painter)
Paint event for the XY plot, called whenever the chart needs to be drawn.
vtkPlotBag::LinePen
vtkPen * LinePen
Definition: vtkPlotBag.h:144
vtkIndent
a simple class to control print indentation
Definition: vtkIndent.h:40
vtkPlotBag::SetInputData
virtual void SetInputData(vtkTable *table, const vtkStdString &yColumn, const vtkStdString &densityColumn)
vtkPlotBag::vtkPlotBag
vtkPlotBag()
vtkPlotBag::BagVisible
bool BagVisible
Definition: vtkPlotBag.h:141
vtkPlotBag::Update
virtual void Update()
Perform any updates to the item that may be necessary before rendering.
vtkSetMacro
vtkSetMacro(IgnoreDriverBugs, bool)
Updates the extensions string.
vtkPlotPoints
Class for drawing an points given two columns from a vtkTable.
Definition: vtkPlotPoints.h:54
vtkPlot::GetPen
vtkPen * GetPen()
vtkPlotBag::~vtkPlotBag
~vtkPlotBag()
vtkPlotBag
Class for drawing an a bagplot.
Definition: vtkPlotBag.h:45
vtkPlotBag::PaintLegend
virtual bool PaintLegend(vtkContext2D *painter, const vtkRectf &rect, int legendIndex)
Paint legend event for the XY plot, called whenever the legend needs the plot items symbol/mark/line ...
vtkStringArray
a vtkAbstractArray subclass for strings
Definition: vtkStringArray.h:43
vtkPlotBag::UpdateTableCache
void UpdateTableCache(vtkDataArray *)
vtkPlotBag::SetPointPen
void SetPointPen(vtkPen *pen)
Set/get the vtkPen object that controls how this plot draws points.
Definition: vtkPlotBag.h:132
vtkPen
provides a pen that draws the outlines of shapes drawn by vtkContext2D.
Definition: vtkPen.h:40
vtkStdString
Wrapper around std::string to keep symbols short.
Definition: vtkStdString.h:49
vtkRectf
Definition: vtkRect.h:297
vtkPlotBag::SetInputData
virtual void SetInputData(vtkTable *table)
Set the input, we are expecting a vtkTable with three columns.
vtkPlotBag::MedianPoints
vtkPoints2D * MedianPoints
Definition: vtkPlotBag.h:142
vtkPlotBag::SetInputData
virtual void SetInputData(vtkTable *table, const vtkStdString &xColumn, const vtkStdString &yColumn, const vtkStdString &densityColumn)
vtkPlotBag::New
static vtkPlotBag * New()
Creates a new Bag Plot object.
vtkPlotBag::GetTooltipLabel
virtual vtkStdString GetTooltipLabel(const vtkVector2d &plotPos, vtkIdType seriesIndex, vtkIdType segmentIndex)
Generate and return the tooltip label string for this plot The segmentIndex parameter is ignored,...