VTK  9.2.6
vtkPlotParallelCoordinates.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkPlotParallelCoordinates.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 
25 #ifndef vtkPlotParallelCoordinates_h
26 #define vtkPlotParallelCoordinates_h
27 
28 #include "vtkChartsCoreModule.h" // For export macro
29 #include "vtkPlot.h"
30 #include "vtkScalarsToColors.h" // For VTK_COLOR_MODE_DEFAULT and _MAP_SCALARS
31 #include "vtkStdString.h" // For vtkStdString ivars
32 
34 class vtkScalarsToColors;
35 class vtkStdString;
36 class vtkTable;
38 
39 class VTKCHARTSCORE_EXPORT vtkPlotParallelCoordinates : public vtkPlot
40 {
41 public:
43  void PrintSelf(ostream& os, vtkIndent indent) override;
44 
49 
53  bool Paint(vtkContext2D* painter) override;
54 
61  bool PaintLegend(vtkContext2D* painter, const vtkRectf& rect, int legendIndex) override;
62 
66  void GetBounds(double bounds[4]) override;
67 
72  bool SetSelectionRange(int axis, float low, float high);
73 
78  bool SetSelectionRange(int axis, std::vector<float> axisSelection);
79 
83  bool ResetSelectionRange();
84 
86 
89  void SetInputData(vtkTable* table) override;
90  void SetInputData(vtkTable* table, const vtkStdString&, const vtkStdString&) override
91  {
92  this->SetInputData(table);
93  }
95 
97 
100  void SetLookupTable(vtkScalarsToColors* lut);
101  vtkScalarsToColors* GetLookupTable();
103 
108  virtual void CreateDefaultLookupTable();
109 
111 
114  vtkSetMacro(ScalarVisibility, vtkTypeBool);
115  vtkGetMacro(ScalarVisibility, vtkTypeBool);
116  vtkBooleanMacro(ScalarVisibility, vtkTypeBool);
118 
120 
125  void SelectColorArray(vtkIdType arrayNum);
126  void SelectColorArray(const vtkStdString& arrayName);
128 
132  vtkStdString GetColorArrayName();
133 
140  bool UpdateCache() override;
141 
142 protected:
144  ~vtkPlotParallelCoordinates() override;
145 
147 
150  class Private;
151  Private* Storage;
153 
155 
163 
164 private:
166  void operator=(const vtkPlotParallelCoordinates&) = delete;
167 };
168 
169 #endif // vtkPlotParallelCoordinates_h
Wrapper around std::string to keep symbols short.
Definition: vtkStdString.h:38
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
virtual bool PaintLegend(vtkContext2D *painter, const vtkRectf &rect, int legendIndex)
Paint legend event for the plot, called whenever the legend needs the plot items symbol/mark/line dra...
virtual bool Paint(vtkContext2D *painter)
Paint event for the item, called whenever the item needs to be drawn.
virtual void GetBounds(double bounds[4])
Get the bounds for this plot as (Xmin, Xmax, Ymin, Ymax).
Definition: vtkPlot.h:352
Class for drawing a parallel coordinate plot given columns from a vtkTable.
void SetInputData(vtkTable *table, const vtkStdString &, const vtkStdString &) override
This is a convenience function to set the input table.
int vtkIdType
Definition: vtkType.h:332
vtkUnsignedCharArray * Colors
Lookup Table for coloring points by scalar value.
int vtkTypeBool
Definition: vtkABI.h:69
Superclass for mapping scalar values to colors.
Class for drawing 2D primitives to a graphical context.
Definition: vtkContext2D.h:57
vtkScalarsToColors * LookupTable
Lookup Table for coloring points by scalar value.
a simple class to control print indentation
Definition: vtkIndent.h:39
virtual bool UpdateCache()
Update the internal cache.
Definition: vtkPlot.h:414
vtkStdString ColorArrayName
Lookup Table for coloring points by scalar value.
vtkTypeBool ScalarVisibility
Lookup Table for coloring points by scalar value.
Abstract class for 2D plots.
Definition: vtkPlot.h:53
dynamic, self-adjusting array of unsigned char
A table, which contains similar-typed columns of data.
Definition: vtkTable.h:73
virtual void SetInputData(vtkTable *table)
This is a convenience function to set the input table and the x, y column for the plot...
static vtkObject * New()
Create an object with Debug turned off, modified time initialized to zero, and reference counting on...
Factory class for drawing 2D charts.