VTK  9.2.6
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
32
33#ifndef vtkPlotBag_h
34#define vtkPlotBag_h
35
36#include "vtkChartsCoreModule.h" // For export macro
37#include "vtkPlotPoints.h"
38
39class vtkPen;
40
41class VTKCHARTSCORE_EXPORT vtkPlotBag : public vtkPlotPoints
42{
43public:
44 vtkTypeMacro(vtkPlotBag, vtkPlotPoints);
45 void PrintSelf(ostream& os, vtkIndent indent) override;
46
50 static vtkPlotBag* New();
51
55 bool Paint(vtkContext2D* painter) override;
56
63 bool PaintLegend(vtkContext2D* painter, const vtkRectf& rect, int legendIndex) override;
64
70
76 const vtkVector2d& plotPos, vtkIdType seriesIndex, vtkIdType segmentIndex) override;
77
79
86 void SetInputData(vtkTable* table) override;
88 vtkTable* table, const vtkStdString& yColumn, const vtkStdString& densityColumn) override;
89 virtual void SetInputData(vtkTable* table, const vtkStdString& xColumn,
90 const vtkStdString& yColumn, const vtkStdString& densityColumn);
92
93 virtual void SetInputData(
94 vtkTable* table, vtkIdType xColumn, vtkIdType yColumn, vtkIdType densityColumn);
95
97
101 vtkSetMacro(BagVisible, bool);
102 vtkGetMacro(BagVisible, bool);
104
106
109 void SetLinePen(vtkPen* pen);
110 vtkGetObjectMacro(LinePen, vtkPen);
112
118 void SetPointPen(vtkPen* pen) { this->SetPen(pen); }
119 vtkPen* GetPointPen() { return this->GetPen(); }
120
127 bool UpdateCache() override;
128
129protected:
131 ~vtkPlotBag() override;
132
137
138private:
139 vtkPlotBag(const vtkPlotBag&) = delete;
140 void operator=(const vtkPlotBag&) = delete;
141};
142
143#endif // vtkPlotBag_h
Class for drawing 2D primitives to a graphical context.
a simple class to control print indentation
Definition vtkIndent.h:34
provides a pen that draws the outlines of shapes drawn by vtkContext2D.
Definition vtkPen.h:37
void SetLinePen(vtkPen *pen)
Set/get the vtkPen object that controls how this plot draws boundary lines.
void SetInputData(vtkTable *table) override
Set the input, we are expecting a vtkTable with three columns.
virtual void SetInputData(vtkTable *table, vtkIdType xColumn, vtkIdType yColumn, vtkIdType densityColumn)
void SetPointPen(vtkPen *pen)
Set/get the vtkPen object that controls how this plot draws points.
Definition vtkPlotBag.h:118
vtkStringArray * GetLabels() override
Get the plot labels.
bool UpdateCache() override
Update the internal cache.
static vtkPlotBag * New()
Creates a new Bag Plot object.
bool BagVisible
Definition vtkPlotBag.h:133
vtkPen * GetPointPen()
Definition vtkPlotBag.h:119
void SetInputData(vtkTable *table, const vtkStdString &yColumn, const vtkStdString &densityColumn) override
Set the input, we are expecting a vtkTable with three columns.
bool Paint(vtkContext2D *painter) override
Paint event for the XY plot, called whenever the chart needs to be drawn.
bool PaintLegend(vtkContext2D *painter, const vtkRectf &rect, int legendIndex) override
Paint legend event for the XY plot, called whenever the legend needs the plot items symbol/mark/line ...
~vtkPlotBag() override
vtkPoints2D * MedianPoints
Definition vtkPlotBag.h:134
vtkStdString GetTooltipLabel(const vtkVector2d &plotPos, vtkIdType seriesIndex, vtkIdType segmentIndex) override
Generate and return the tooltip label string for this plot The segmentIndex parameter is ignored,...
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
virtual void SetInputData(vtkTable *table, const vtkStdString &xColumn, const vtkStdString &yColumn, const vtkStdString &densityColumn)
Set the input, we are expecting a vtkTable with three columns.
vtkPoints2D * Q3Points
Definition vtkPlotBag.h:135
vtkPen * LinePen
Definition vtkPlotBag.h:136
vtkPen * GetPen()
Set/get the vtkPen object that controls how this plot draws (out)lines.
void SetPen(vtkPen *pen)
Set/get the vtkPen object that controls how this plot draws (out)lines.
represent and manipulate 2D points
Definition vtkPoints2D.h:34
Wrapper around std::string to keep symbols short.
a vtkAbstractArray subclass for strings
A table, which contains similar-typed columns of data.
Definition vtkTable.h:68
int vtkIdType
Definition vtkType.h:332