VTK  9.7.1
vtkPlotParallelCoordinates.h
Go to the documentation of this file.
1 // SPDX-FileCopyrightText: Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
2 // SPDX-License-Identifier: BSD-3-Clause
3 
16 #ifndef vtkPlotParallelCoordinates_h
17 #define vtkPlotParallelCoordinates_h
18 
19 #include "vtkChartsCoreModule.h" // For export macro
20 #include "vtkPlot.h"
21 #include "vtkScalarsToColors.h" // For VTK_COLOR_MODE_DEFAULT and _MAP_SCALARS
22 #include "vtkStdString.h" // For vtkStdString ivars
23 #include "vtkWrappingHints.h" // For VTK_MARSHALAUTO
24 
25 VTK_ABI_NAMESPACE_BEGIN
27 class vtkScalarsToColors;
28 class vtkTable;
30 
31 class VTKCHARTSCORE_EXPORT VTK_MARSHALAUTO vtkPlotParallelCoordinates : public vtkPlot
32 {
33 public:
35  void PrintSelf(ostream& os, vtkIndent indent) override;
36 
41 
45  bool Paint(vtkContext2D* painter) override;
46 
53  bool PaintLegend(vtkContext2D* painter, const vtkRectf& rect, int legendIndex) override;
54 
58  void GetBounds(double bounds[4]) override;
59 
64  bool SetSelectionRange(int axis, float low, float high);
65 
70  bool SetSelectionRange(int axis, std::vector<float> axisSelection);
71 
75  bool ResetSelectionRange();
76 
78 
81  void SetInputData(vtkTable* table) override;
82  void SetInputData(vtkTable* table, const vtkStdString&, const vtkStdString&) override
83  {
84  this->SetInputData(table);
85  }
87 
89 
92  void SetLookupTable(vtkScalarsToColors* lut);
93  vtkScalarsToColors* GetLookupTable();
95 
100  virtual void CreateDefaultLookupTable();
101 
103 
106  vtkSetMacro(ScalarVisibility, vtkTypeBool);
107  vtkGetMacro(ScalarVisibility, vtkTypeBool);
108  vtkBooleanMacro(ScalarVisibility, vtkTypeBool);
110 
112 
117  void SelectColorArray(vtkIdType arrayNum);
118  void SelectColorArray(const vtkStdString& arrayName);
120 
122 
132  vtkSetMacro(ColorMode, int);
133  void SetColorModeToDefault() { this->SetColorMode(VTK_COLOR_MODE_DEFAULT); }
134  void SetColorModeToMapScalars() { this->SetColorMode(VTK_COLOR_MODE_MAP_SCALARS); }
136  vtkGetMacro(ColorMode, int);
138 
142  vtkStdString GetColorArrayName();
143 
150  bool UpdateCache() override;
151 
152 protected:
154  ~vtkPlotParallelCoordinates() override;
155 
157 
160  class Private;
161  Private* Storage;
163 
165 
174 
175 private:
177  void operator=(const vtkPlotParallelCoordinates&) = delete;
178 };
179 
180 VTK_ABI_NAMESPACE_END
181 #endif // vtkPlotParallelCoordinates_h
Wrapper around std::string to keep symbols short.
Definition: vtkStdString.h:27
#define VTK_COLOR_MODE_DIRECT_SCALARS
int ColorMode
Lookup Table for coloring points by scalar value.
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:393
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:363
vtkUnsignedCharArray * Colors
Lookup Table for coloring points by scalar value.
int vtkTypeBool
Definition: vtkABI.h:64
Superclass for mapping scalar values to colors.
Class for drawing 2D primitives to a graphical context.
Definition: vtkContext2D.h:49
vtkScalarsToColors * LookupTable
Lookup Table for coloring points by scalar value.
#define VTK_COLOR_MODE_MAP_SCALARS
a simple class to control print indentation
Definition: vtkIndent.h:28
virtual bool UpdateCache()
Update the internal cache.
Definition: vtkPlot.h:455
vtkStdString ColorArrayName
Lookup Table for coloring points by scalar value.
#define VTK_COLOR_MODE_DEFAULT
void SetColorModeToDefault()
Set/Get the color mode for the plot.
void SetColorModeToDirectScalars()
Set/Get the color mode for the plot.
vtkTypeBool ScalarVisibility
Lookup Table for coloring points by scalar value.
Abstract class for 2D plots.
Definition: vtkPlot.h:43
dynamic, self-adjusting array of unsigned char
A table, which contains similar-typed columns of data.
Definition: vtkTable.h:59
virtual void SetInputData(vtkTable *table)
This is a convenience function to set the input table and the x, y column for the plot...
void SetColorModeToMapScalars()
Set/Get the color mode for the plot.
#define VTK_MARSHALAUTO
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.