VTK  9.4.20250123
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
25VTK_ABI_NAMESPACE_BEGIN
28class vtkTable;
30
31class VTKCHARTSCORE_EXPORT VTK_MARSHALAUTO vtkPlotParallelCoordinates : public vtkPlot
32{
33public:
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
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
95
101
103
106 vtkSetMacro(ScalarVisibility, vtkTypeBool);
107 vtkGetMacro(ScalarVisibility, vtkTypeBool);
108 vtkBooleanMacro(ScalarVisibility, vtkTypeBool);
110
112
118 void SelectColorArray(const vtkStdString& arrayName);
120
122
132 vtkSetMacro(ColorMode, int);
133 void SetColorModeToDefault() { this->SetColorMode(VTK_COLOR_MODE_DEFAULT); }
136 vtkGetMacro(ColorMode, int);
138
143
150 bool UpdateCache() override;
151
152protected:
155
157
160 class Private;
161 Private* Storage;
163
165
174
175private:
177 void operator=(const vtkPlotParallelCoordinates&) = delete;
178};
179
180VTK_ABI_NAMESPACE_END
181#endif // vtkPlotParallelCoordinates_h
Factory class for drawing 2D charts.
Class for drawing 2D primitives to a graphical context.
a simple class to control print indentation
Definition vtkIndent.h:108
Class for drawing a parallel coordinate plot given columns from a vtkTable.
void SetColorModeToDefault()
Set/Get the color mode for the plot.
void SetColorModeToDirectScalars()
Set/Get the color mode for the plot.
virtual void CreateDefaultLookupTable()
Create default lookup table.
void SetColorModeToMapScalars()
Set/Get the color mode for the plot.
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 ...
void GetBounds(double bounds[4]) override
Get the bounds for this mapper as (Xmin,Xmax,Ymin,Ymax,Zmin,Zmax).
bool Paint(vtkContext2D *painter) override
Paint event for the XY plot, called whenever the chart needs to be drawn.
vtkUnsignedCharArray * Colors
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.
vtkStdString ColorArrayName
Lookup Table for coloring points by scalar value.
vtkScalarsToColors * GetLookupTable()
Specify a lookup table for the mapper to use.
void SetInputData(vtkTable *table) override
This is a convenience function to set the input table.
vtkStdString GetColorArrayName()
Get the array name to color by.
bool UpdateCache() override
Update the internal cache.
bool ResetSelectionRange()
Reset the selection criteria for the chart.
~vtkPlotParallelCoordinates() override
static vtkPlotParallelCoordinates * New()
Creates a parallel coordinates chart.
bool SetSelectionRange(int axis, std::vector< float > axisSelection)
Set the selection criteria on the given axis in normalized space [0.0 ; 1.0] axisSelection should be ...
void SetLookupTable(vtkScalarsToColors *lut)
Specify a lookup table for the mapper to use.
void SelectColorArray(vtkIdType arrayNum)
When ScalarMode is set to UsePointFieldData or UseCellFieldData, you can specify which array to use f...
void SelectColorArray(const vtkStdString &arrayName)
When ScalarMode is set to UsePointFieldData or UseCellFieldData, you can specify which array to use f...
void SetInputData(vtkTable *table, const vtkStdString &, const vtkStdString &) override
This is a convenience function to set the input table.
int ColorMode
Lookup Table for coloring points by scalar value.
vtkScalarsToColors * LookupTable
Lookup Table for coloring points by scalar value.
vtkTypeBool ScalarVisibility
Lookup Table for coloring points by scalar value.
bool SetSelectionRange(int axis, float low, float high)
Set the selection criteria on the given axis in normalized space (0.0 - 1.0) for a specific range.
Abstract class for 2D plots.
Definition vtkPlot.h:153
virtual void SetInputData(vtkTable *table)
This is a convenience function to set the input table and the x, y column for the plot.
Superclass for mapping scalar values to colors.
Wrapper around std::string to keep symbols short.
A table, which contains similar-typed columns of data.
Definition vtkTable.h:169
dynamic, self-adjusting array of unsigned char
int vtkTypeBool
Definition vtkABI.h:64
#define VTK_COLOR_MODE_MAP_SCALARS
#define VTK_COLOR_MODE_DEFAULT
#define VTK_COLOR_MODE_DIRECT_SCALARS
int vtkIdType
Definition vtkType.h:315
#define VTK_MARSHALAUTO