VTK  9.7.1
vtkParallelCoordinatesActor.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
51 #ifndef vtkParallelCoordinatesActor_h
52 #define vtkParallelCoordinatesActor_h
53 
54 #include "vtkActor2D.h"
55 #include "vtkRenderingAnnotationModule.h" // For export macro
56 #include "vtkWrappingHints.h" // For VTK_MARSHALAUTO
57 
58 VTK_ABI_NAMESPACE_BEGIN
59 class vtkAlgorithmOutput;
60 class vtkAxisActor2D;
61 class vtkDataObject;
62 class vtkPolyData;
64 class vtkTextMapper;
65 class vtkTextProperty;
66 class vtkParallelCoordinatesActorConnection;
67 
68 #define VTK_IV_COLUMN 0
69 #define VTK_IV_ROW 1
70 
71 class VTKRENDERINGANNOTATION_EXPORT VTK_MARSHALAUTO vtkParallelCoordinatesActor : public vtkActor2D
72 {
73 public:
75  void PrintSelf(ostream& os, vtkIndent indent) override;
76 
84 
86 
91  vtkSetClampMacro(IndependentVariables, int, VTK_IV_COLUMN, VTK_IV_ROW);
92  vtkGetMacro(IndependentVariables, int);
93  void SetIndependentVariablesToColumns() { this->SetIndependentVariables(VTK_IV_COLUMN); }
94  void SetIndependentVariablesToRows() { this->SetIndependentVariables(VTK_IV_ROW); }
96 
98 
101  vtkSetStringMacro(Title);
102  vtkGetStringMacro(Title);
104 
106 
111  vtkSetClampMacro(NumberOfLabels, int, 0, 50);
112  vtkGetMacro(NumberOfLabels, int);
114 
116 
119  vtkSetStringMacro(LabelFormat);
120  vtkGetStringMacro(LabelFormat);
122 
124 
127  virtual void SetTitleTextProperty(vtkTextProperty* p);
128  vtkGetObjectMacro(TitleTextProperty, vtkTextProperty);
130 
132 
135  virtual void SetLabelTextProperty(vtkTextProperty* p);
136  vtkGetObjectMacro(LabelTextProperty, vtkTextProperty);
138 
140 
143  int RenderOpaqueGeometry(vtkViewport*) override;
144  int RenderOverlay(vtkViewport*) override;
145  int RenderTranslucentPolygonalGeometry(vtkViewport*) override { return 0; }
147 
152 
157  virtual void SetInputConnection(vtkAlgorithmOutput*);
158 
163  virtual void SetInputData(vtkDataObject*);
164 
168  vtkDataObject* GetInput();
169 
175  void ReleaseGraphicsResources(vtkWindow*) override;
176 
177 protected:
179  ~vtkParallelCoordinatesActor() override;
180 
181 private:
182  vtkParallelCoordinatesActorConnection* ConnectionHolder;
183 
184  int IndependentVariables; // Use column or row
185  vtkIdType N; // The number of independent variables
186  double* Mins; // Minimum data value along this row/column
187  double* Maxs; // Maximum data value along this row/column
188  int* Xs; // Axes x-values (in viewport coordinates)
189  int YMin; // Axes y-min-value (in viewport coordinates)
190  int YMax; // Axes y-max-value (in viewport coordinates)
191  int NumberOfLabels; // Along each axis
192  char* LabelFormat;
193  char* Title;
194 
195  vtkAxisActor2D** Axes;
196  vtkTextMapper* TitleMapper;
197  vtkActor2D* TitleActor;
198 
199  vtkTextProperty* TitleTextProperty;
200  vtkTextProperty* LabelTextProperty;
201 
202  vtkPolyData* PlotData; // The lines drawn within the axes
203  vtkPolyDataMapper2D* PlotMapper;
204  vtkActor2D* PlotActor;
205 
206  vtkTimeStamp BuildTime;
207 
208  int LastPosition[2];
209  int LastPosition2[2];
210 
211  void Initialize();
212  int PlaceAxes(vtkViewport* viewport, const int* size);
213 
215  void operator=(const vtkParallelCoordinatesActor&) = delete;
216 };
217 
218 VTK_ABI_NAMESPACE_END
219 #endif
int RenderOverlay(vtkViewport *viewport) override
Support the standard render methods.
abstract specification for Viewports
Definition: vtkViewport.h:46
create parallel coordinate display from input field
a actor that draws 2D data
Definition: vtkActor2D.h:35
record modification and/or execution time
Definition: vtkTimeStamp.h:24
Create an axis with tick marks and labels.
int vtkIdType
Definition: vtkType.h:363
concrete dataset represents vertices, lines, polygons, and triangle strips
Definition: vtkPolyData.h:71
#define VTK_IV_COLUMN
2D text annotation
Definition: vtkTextMapper.h:39
Proxy object to connect input/output ports.
void SetIndependentVariablesToRows()
Specify whether to use the rows or columns as independent variables.
int vtkTypeBool
Definition: vtkABI.h:64
window superclass for vtkRenderWindow
Definition: vtkWindow.h:41
int RenderTranslucentPolygonalGeometry(vtkViewport *) override
Draw the parallel coordinates plot.
void SetIndependentVariablesToColumns()
Specify whether to use the rows or columns as independent variables.
void ReleaseGraphicsResources(vtkWindow *) override
Release any graphics resources that are being consumed by this actor.
a simple class to control print indentation
Definition: vtkIndent.h:28
static vtkActor2D * New()
Creates an actor2D with the following defaults: position (0,0) (coordinate system is viewport); at la...
#define VTK_IV_ROW
represent text properties.
vtkTypeBool HasTranslucentPolygonalGeometry() override
Does this prop have some translucent polygonal geometry?
int RenderOpaqueGeometry(vtkViewport *viewport) override
Support the standard render methods.
#define VTK_MARSHALAUTO
general representation of visualization data
Definition: vtkDataObject.h:55
draw vtkPolyData onto the image plane
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.