VTK  9.0.1
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 vtkTable;
35 class vtkStdString;
36 class vtkScalarsToColors;
38 
39 class VTKCHARTSCORE_EXPORT vtkPlotParallelCoordinates : public vtkPlot
40 {
41 public:
43  void PrintSelf(ostream& os, vtkIndent indent) override;
44 
49 
55  void Update() override;
56 
60  bool Paint(vtkContext2D* painter) override;
61 
68  bool PaintLegend(vtkContext2D* painter, const vtkRectf& rect, int legendIndex) override;
69 
73  void GetBounds(double bounds[4]) override;
74 
78  bool SetSelectionRange(int Axis, float low, float high);
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 
134 protected:
136  ~vtkPlotParallelCoordinates() override;
137 
141  bool UpdateTableCache(vtkTable* table);
142 
144 
147  class Private;
148  Private* Storage;
150 
155 
157 
165 
166 private:
168  void operator=(const vtkPlotParallelCoordinates&) = delete;
169 };
170 
171 #endif // vtkPlotParallelCoordinates_h
vtkPlotParallelCoordinates::ColorArrayName
vtkStdString ColorArrayName
Definition: vtkPlotParallelCoordinates.h:163
vtkStdString.h
vtkPlotParallelCoordinates::Storage
Private * Storage
Definition: vtkPlotParallelCoordinates.h:147
vtkPlot.h
vtkPlotParallelCoordinates::SetInputData
void SetInputData(vtkTable *table, const vtkStdString &, const vtkStdString &) override
Definition: vtkPlotParallelCoordinates.h:90
vtkIdType
int vtkIdType
Definition: vtkType.h:338
vtkTable
A table, which contains similar-typed columns of data.
Definition: vtkTable.h:62
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
vtkUnsignedCharArray
dynamic, self-adjusting array of unsigned char
Definition: vtkUnsignedCharArray.h:35
vtkPlotParallelCoordinates::LookupTable
vtkScalarsToColors * LookupTable
Lookup Table for coloring points by scalar value.
Definition: vtkPlotParallelCoordinates.h:160
vtkPlot::SetInputData
virtual void SetInputData(vtkTable *table)
This is a convenience function to set the input table and the x, y column for the plot.
vtkContext2D
Class for drawing 2D primitives to a graphical context.
Definition: vtkContext2D.h:52
vtkPlot
Abstract class for 2D plots.
Definition: vtkPlot.h:46
vtkIndent
a simple class to control print indentation
Definition: vtkIndent.h:33
vtkScalarsToColors.h
vtkPlotParallelCoordinates::Colors
vtkUnsignedCharArray * Colors
Definition: vtkPlotParallelCoordinates.h:161
vtkScalarsToColors
Superclass for mapping scalar values to colors.
Definition: vtkScalarsToColors.h:59
vtkPlotParallelCoordinates::BuildTime
vtkTimeStamp BuildTime
The point cache is marked dirty until it has been initialized.
Definition: vtkPlotParallelCoordinates.h:154
vtkPlot::PaintLegend
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...
vtkPlotParallelCoordinates::ScalarVisibility
vtkTypeBool ScalarVisibility
Definition: vtkPlotParallelCoordinates.h:162
vtkAbstractContextItem::Paint
virtual bool Paint(vtkContext2D *painter)
Paint event for the item, called whenever the item needs to be drawn.
vtkChartParallelCoordinates
Factory class for drawing 2D charts.
Definition: vtkChartParallelCoordinates.h:36
vtkPlotParallelCoordinates
Class for drawing a parallel coordinate plot given columns from a vtkTable.
Definition: vtkPlotParallelCoordinates.h:39
vtkStdString
Wrapper around std::string to keep symbols short.
Definition: vtkStdString.h:34
vtkPlot::GetBounds
virtual void GetBounds(double bounds[4])
Get the bounds for this plot as (Xmin, Xmax, Ymin, Ymax).
Definition: vtkPlot.h:343
vtkPlot::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
vtkRectf
Definition: vtkRect.h:326
vtkTypeBool
int vtkTypeBool
Definition: vtkABI.h:69
vtkAbstractContextItem::Update
virtual void Update()
Perform any updates to the item that may be necessary before rendering.