VTK
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,
69  int legendIndex) override;
70 
74  void GetBounds(double bounds[4]) override;
75 
79  bool SetSelectionRange(int Axis, float low, float high);
80 
84  bool ResetSelectionRange();
85 
87 
90  void SetInputData(vtkTable *table) override;
91  void SetInputData(vtkTable *table, const vtkStdString&,
92  const vtkStdString&) override
93  {
94  this->SetInputData(table);
95  }
97 
99 
102  void SetLookupTable(vtkScalarsToColors *lut);
103  vtkScalarsToColors *GetLookupTable();
105 
110  virtual void CreateDefaultLookupTable();
111 
113 
116  vtkSetMacro(ScalarVisibility,vtkTypeBool);
117  vtkGetMacro(ScalarVisibility,vtkTypeBool);
118  vtkBooleanMacro(ScalarVisibility,vtkTypeBool);
120 
122 
127  void SelectColorArray(vtkIdType arrayNum);
128  void SelectColorArray(const vtkStdString &arrayName);
130 
134  vtkStdString GetColorArrayName();
135 
136 protected:
138  ~vtkPlotParallelCoordinates() override;
139 
143  bool UpdateTableCache(vtkTable *table);
144 
146 
149  class Private;
150  Private* Storage;
152 
157 
159 
167 
168 private:
170  void operator=(const vtkPlotParallelCoordinates &) = delete;
171 
172 };
173 
174 #endif //vtkPlotParallelCoordinates_h
vtkPlotParallelCoordinates::ColorArrayName
vtkStdString ColorArrayName
Definition: vtkPlotParallelCoordinates.h:165
vtkStdString.h
vtkPlotParallelCoordinates::Storage
Private * Storage
Definition: vtkPlotParallelCoordinates.h:149
vtkPlot.h
vtkPlotParallelCoordinates::SetInputData
void SetInputData(vtkTable *table, const vtkStdString &, const vtkStdString &) override
Definition: vtkPlotParallelCoordinates.h:91
vtkIdType
int vtkIdType
Definition: vtkType.h:347
vtkTable
A table, which contains similar-typed columns of data.
Definition: vtkTable.h:68
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:35
vtkUnsignedCharArray
dynamic, self-adjusting array of unsigned char
Definition: vtkUnsignedCharArray.h:41
vtkPlotParallelCoordinates::LookupTable
vtkScalarsToColors * LookupTable
Lookup Table for coloring points by scalar value.
Definition: vtkPlotParallelCoordinates.h:162
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:58
vtkPlot
Abstract class for 2D plots.
Definition: vtkPlot.h:52
vtkIndent
a simple class to control print indentation
Definition: vtkIndent.h:39
vtkScalarsToColors.h
vtkPlotParallelCoordinates::Colors
vtkUnsignedCharArray * Colors
Definition: vtkPlotParallelCoordinates.h:163
vtkScalarsToColors
Superclass for mapping scalar values to colors.
Definition: vtkScalarsToColors.h:66
vtkPlotParallelCoordinates::BuildTime
vtkTimeStamp BuildTime
The point cache is marked dirty until it has been initialized.
Definition: vtkPlotParallelCoordinates.h:156
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:164
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:39
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:40
vtkPlot::GetBounds
virtual void GetBounds(double bounds[4])
Get the bounds for this plot as (Xmin, Xmax, Ymin, Ymax).
Definition: vtkPlot.h:336
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:332
vtkTypeBool
int vtkTypeBool
Definition: vtkABI.h:69
vtkAbstractContextItem::Update
virtual void Update()
Perform any updates to the item that may be necessary before rendering.