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 
35 #ifndef vtkPlotBag_h
36 #define vtkPlotBag_h
37 
38 #include "vtkChartsCoreModule.h" // For export macro
39 #include "vtkPlotPoints.h"
40 
41 class vtkPen;
42 
44 {
45 public:
46  vtkTypeMacro(vtkPlotBag, vtkPlotPoints);
47  virtual void PrintSelf(ostream &os, vtkIndent indent);
48 
50  static vtkPlotBag *New();
51 
55  virtual void Update();
56 
59  virtual bool Paint(vtkContext2D *painter);
60 
62 
67  virtual bool PaintLegend(vtkContext2D *painter, const vtkRectf& rect,
68  int legendIndex);
70 
74  virtual vtkStringArray *GetLabels();
75 
77 
79  virtual vtkStdString GetTooltipLabel(const vtkVector2d &plotPos,
80  vtkIdType seriesIndex,
81  vtkIdType segmentIndex);
83 
85 
90  virtual void SetInputData(vtkTable *table);
91  virtual void SetInputData(vtkTable *table, const vtkStdString &yColumn,
92  const vtkStdString &densityColumn);
93  virtual void SetInputData(vtkTable *table, const vtkStdString &xColumn,
94  const vtkStdString &yColumn,
95  const vtkStdString &densityColumn);
97 
98  virtual void SetInputData(vtkTable *table, vtkIdType xColumn,
99  vtkIdType yColumn,
100  vtkIdType densityColumn);
101 
103 
104  vtkSetMacro(BagVisible, bool);
105  vtkGetMacro(BagVisible, bool);
107 
109 
111  void SetLinePen(vtkPen* pen);
112  vtkGetObjectMacro(LinePen, vtkPen);
114 
116 
119  void SetPointPen(vtkPen* pen) { this->SetPen(pen); }
120  vtkPen* GetPointPen() { return this->GetPen(); }
122 
123 protected:
124  vtkPlotBag();
125  ~vtkPlotBag();
126 
128 
133 
134 private:
135  vtkPlotBag(const vtkPlotBag &); // Not implemented.
136  void operator=(const vtkPlotBag &); // Not implemented.
137 };
138 
139 #endif //vtkPlotBag_h
Wrapper around std::string to keep symbols short.
Definition: vtkStdString.h:46
bool BagVisible
Definition: vtkPlotBag.h:129
vtkPen * LinePen
Definition: vtkPlotBag.h:132
virtual bool Paint(vtkContext2D *painter)
void SetPen(vtkPen *pen)
Class for drawing an points given two columns from a vtkTable.
Definition: vtkPlotPoints.h:52
void SetPointPen(vtkPen *pen)
Definition: vtkPlotBag.h:119
a vtkAbstractArray subclass for strings
int vtkIdType
Definition: vtkType.h:275
vtkPen * GetPen()
Class for drawing 2D primitives to a graphical context.
Definition: vtkContext2D.h:56
a simple class to control print indentation
Definition: vtkIndent.h:38
represent and manipulate 2D points
Definition: vtkPoints2D.h:35
virtual vtkStringArray * GetLabels()
vtkPoints2D * Q3Points
Definition: vtkPlotBag.h:131
abstract superclass for arrays of numeric data
Definition: vtkDataArray.h:54
virtual bool PaintLegend(vtkContext2D *painter, const vtkRectf &rect, int legendIndex)
vtkPoints2D * MedianPoints
Definition: vtkPlotBag.h:130
provides a pen that draws the outlines of shapes drawn by vtkContext2D.
Definition: vtkPen.h:38
vtkPen * GetPointPen()
Definition: vtkPlotBag.h:120
virtual void PrintSelf(ostream &os, vtkIndent indent)
A table, which contains similar-typed columns of data.
Definition: vtkTable.h:67
virtual void SetInputData(vtkTable *table)
static vtkPlotPoints * New()
bool UpdateTableCache(vtkTable *table)
virtual void Update()
#define VTKCHARTSCORE_EXPORT
virtual vtkStdString GetTooltipLabel(const vtkVector2d &plotPos, vtkIdType seriesIndex, vtkIdType segmentIndex)
Class for drawing an a bagplot.
Definition: vtkPlotBag.h:43