VTK  9.0.1
vtkChartParallelCoordinates.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkChartParallelCoordinates.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 
24 #ifndef vtkChartParallelCoordinates_h
25 #define vtkChartParallelCoordinates_h
26 
27 #include "vtkChart.h"
28 #include "vtkChartsCoreModule.h" // For export macro
29 #include "vtkNew.h" // For vtkNew
30 
31 class vtkIdTypeArray;
32 class vtkStdString;
33 class vtkStringArray;
35 
36 class VTKCHARTSCORE_EXPORT vtkChartParallelCoordinates : public vtkChart
37 {
38 public:
40  void PrintSelf(ostream& os, vtkIndent indent) override;
41 
46 
52  void Update() override;
53 
57  bool Paint(vtkContext2D* painter) override;
58 
62  void SetColumnVisibility(const vtkStdString& name, bool visible);
63 
68  void SetColumnVisibilityAll(bool visible);
69 
73  bool GetColumnVisibility(const vtkStdString& name);
74 
78  virtual vtkStringArray* GetVisibleColumns();
79 
83  virtual void SetVisibleColumns(vtkStringArray* visColumns);
84 
88  vtkPlot* GetPlot(vtkIdType index) override;
89 
93  vtkIdType GetNumberOfPlots() override;
94 
98  vtkAxis* GetAxis(int axisIndex) override;
99 
103  vtkIdType GetNumberOfAxes() override;
104 
109  void RecalculateBounds() override;
110 
115  virtual void SetPlot(vtkPlotParallelCoordinates* plot);
116 
120  bool Hit(const vtkContextMouseEvent& mouse) override;
121 
125  bool MouseEnterEvent(const vtkContextMouseEvent& mouse) override;
126 
130  bool MouseMoveEvent(const vtkContextMouseEvent& mouse) override;
131 
135  bool MouseLeaveEvent(const vtkContextMouseEvent& mouse) override;
136 
140  bool MouseButtonPressEvent(const vtkContextMouseEvent& mouse) override;
141 
145  bool MouseButtonReleaseEvent(const vtkContextMouseEvent& mouse) override;
146 
150  bool MouseWheelEvent(const vtkContextMouseEvent& mouse, int delta) override;
151 
152 protected:
154  ~vtkChartParallelCoordinates() override;
155 
157 
160  class Private;
161  Private* Storage;
163 
165 
170 
175 
180 
181  void ResetSelection();
182  bool ResetAxeSelection(int axe);
183  void ResetAxesSelection();
184  void UpdateGeometry();
185  void CalculatePlotTransform();
186  void SwapAxes(int a1, int a2);
187 
188 private:
190  void operator=(const vtkChartParallelCoordinates&) = delete;
191 };
192 
193 #endif // vtkChartParallelCoordinates_h
vtkChart
Factory class for drawing 2D charts.
Definition: vtkChart.h:44
vtkChart::GetNumberOfPlots
virtual vtkIdType GetNumberOfPlots()
Get the number of plots the chart contains.
vtkContextMouseEvent
data structure to represent mouse events.
Definition: vtkContextMouseEvent.h:34
vtkIdType
int vtkIdType
Definition: vtkType.h:338
vtkObject::New
static vtkObject * New()
Create an object with Debug turned off, modified time initialized to zero, and reference counting on.
vtkTimeStamp
record modification and/or execution time
Definition: vtkTimeStamp.h:32
vtkChart.h
vtkChart::CalculatePlotTransform
bool CalculatePlotTransform(vtkAxis *x, vtkAxis *y, vtkTransform2D *transform)
Given the x and y vtkAxis, and a transform, calculate the transform that the points in a chart would ...
vtkContext2D
Class for drawing 2D primitives to a graphical context.
Definition: vtkContext2D.h:52
vtkPlot
Abstract class for 2D plots.
Definition: vtkPlot.h:46
vtkChartParallelCoordinates::VisibleColumns
vtkNew< vtkStringArray > VisibleColumns
Strongly owned internal data for the column visibility.
Definition: vtkChartParallelCoordinates.h:174
vtkChart::Paint
bool Paint(vtkContext2D *painter) override=0
Paint event for the chart, called whenever the chart needs to be drawn.
vtkIndent
a simple class to control print indentation
Definition: vtkIndent.h:33
vtkAbstractContextItem::Hit
virtual bool Hit(const vtkContextMouseEvent &mouse)
Return true if the supplied x, y coordinate is inside the item.
vtkChart::GetPlot
virtual vtkPlot * GetPlot(vtkIdType index)
Get the plot at the specified index, returns null if the index is invalid.
vtkNew< vtkStringArray >
vtkAbstractContextItem::MouseMoveEvent
virtual bool MouseMoveEvent(const vtkContextMouseEvent &mouse)
Mouse move event.
vtkX3D::name
@ name
Definition: vtkX3D.h:225
vtkChartParallelCoordinates::GeometryValid
bool GeometryValid
Definition: vtkChartParallelCoordinates.h:164
vtkAbstractContextItem::MouseButtonReleaseEvent
virtual bool MouseButtonReleaseEvent(const vtkContextMouseEvent &mouse)
Mouse button release event.
vtkIdTypeArray
dynamic, self-adjusting array of vtkIdType
Definition: vtkIdTypeArray.h:35
vtkChartParallelCoordinates::Selection
vtkIdTypeArray * Selection
Selected indices for the table the plot is rendering.
Definition: vtkChartParallelCoordinates.h:169
vtkChartParallelCoordinates::BuildTime
vtkTimeStamp BuildTime
The point cache is marked dirty until it has been initialized.
Definition: vtkChartParallelCoordinates.h:179
vtkChart::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
vtkNew.h
vtkAxis
takes care of drawing 2D axes
Definition: vtkAxis.h:68
vtkAbstractContextItem::MouseEnterEvent
virtual bool MouseEnterEvent(const vtkContextMouseEvent &mouse)
Mouse enter event.
vtkChartParallelCoordinates::Storage
Private * Storage
Definition: vtkChartParallelCoordinates.h:160
vtkChart::RecalculateBounds
virtual void RecalculateBounds()
Request that the chart recalculates the range of its axes.
vtkStringArray
a vtkAbstractArray subclass for strings
Definition: vtkStringArray.h:36
vtkChartParallelCoordinates
Factory class for drawing 2D charts.
Definition: vtkChartParallelCoordinates.h:36
vtkChart::GetNumberOfAxes
virtual vtkIdType GetNumberOfAxes()
Get the number of axes in the current chart.
vtkAbstractContextItem::MouseLeaveEvent
virtual bool MouseLeaveEvent(const vtkContextMouseEvent &mouse)
Mouse leave event.
vtkPlotParallelCoordinates
Class for drawing a parallel coordinate plot given columns from a vtkTable.
Definition: vtkPlotParallelCoordinates.h:39
vtkAbstractContextItem::MouseButtonPressEvent
virtual bool MouseButtonPressEvent(const vtkContextMouseEvent &mouse)
Mouse button down event Return true if the item holds the event, false if the event can be propagated...
vtkStdString
Wrapper around std::string to keep symbols short.
Definition: vtkStdString.h:34
vtkX3D::index
@ index
Definition: vtkX3D.h:252
vtkChart::GetAxis
virtual vtkAxis * GetAxis(int axisIndex)
Get the axis specified by axisIndex.
vtkAbstractContextItem::MouseWheelEvent
virtual bool MouseWheelEvent(const vtkContextMouseEvent &mouse, int delta)
Mouse wheel event, positive delta indicates forward movement of the wheel.
vtkAbstractContextItem::Update
virtual void Update()
Perform any updates to the item that may be necessary before rendering.