VTK  9.3.0
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
57VTK_ABI_NAMESPACE_BEGIN
59class vtkAxisActor2D;
60class vtkDataObject;
61class vtkPolyData;
63class vtkTextMapper;
64class vtkTextProperty;
65class vtkParallelCoordinatesActorConnection;
66
67#define VTK_IV_COLUMN 0
68#define VTK_IV_ROW 1
69
70class VTKRENDERINGANNOTATION_EXPORT vtkParallelCoordinatesActor : public vtkActor2D
71{
72public:
74 void PrintSelf(ostream& os, vtkIndent indent) override;
75
83
85
90 vtkSetClampMacro(IndependentVariables, int, VTK_IV_COLUMN, VTK_IV_ROW);
91 vtkGetMacro(IndependentVariables, int);
92 void SetIndependentVariablesToColumns() { this->SetIndependentVariables(VTK_IV_COLUMN); }
93 void SetIndependentVariablesToRows() { this->SetIndependentVariables(VTK_IV_ROW); }
95
97
100 vtkSetStringMacro(Title);
101 vtkGetStringMacro(Title);
103
105
110 vtkSetClampMacro(NumberOfLabels, int, 0, 50);
111 vtkGetMacro(NumberOfLabels, int);
113
115
118 vtkSetStringMacro(LabelFormat);
119 vtkGetStringMacro(LabelFormat);
121
123
127 vtkGetObjectMacro(TitleTextProperty, vtkTextProperty);
129
131
135 vtkGetObjectMacro(LabelTextProperty, vtkTextProperty);
137
139
146
151
157
163
168
175
176protected:
179
180private:
181 vtkParallelCoordinatesActorConnection* ConnectionHolder;
182
183 int IndependentVariables; // Use column or row
184 vtkIdType N; // The number of independent variables
185 double* Mins; // Minimum data value along this row/column
186 double* Maxs; // Maximum data value along this row/column
187 int* Xs; // Axes x-values (in viewport coordinates)
188 int YMin; // Axes y-min-value (in viewport coordinates)
189 int YMax; // Axes y-max-value (in viewport coordinates)
190 int NumberOfLabels; // Along each axis
191 char* LabelFormat;
192 char* Title;
193
194 vtkAxisActor2D** Axes;
195 vtkTextMapper* TitleMapper;
196 vtkActor2D* TitleActor;
197
198 vtkTextProperty* TitleTextProperty;
199 vtkTextProperty* LabelTextProperty;
200
201 vtkPolyData* PlotData; // The lines drawn within the axes
202 vtkPolyDataMapper2D* PlotMapper;
203 vtkActor2D* PlotActor;
204
205 vtkTimeStamp BuildTime;
206
207 int LastPosition[2];
208 int LastPosition2[2];
209
210 void Initialize();
211 int PlaceAxes(vtkViewport* viewport, const int* size);
212
214 void operator=(const vtkParallelCoordinatesActor&) = delete;
215};
216
217VTK_ABI_NAMESPACE_END
218#endif
a actor that draws 2D data
Definition vtkActor2D.h:35
Proxy object to connect input/output ports.
Create an axis with tick marks and labels.
general representation of visualization data
a simple class to control print indentation
Definition vtkIndent.h:29
create parallel coordinate display from input field
vtkDataObject * GetInput()
Remove a dataset from the list of data to append.
vtkTypeBool HasTranslucentPolygonalGeometry() override
Does this prop have some translucent polygonal geometry?
virtual void SetLabelTextProperty(vtkTextProperty *p)
Set/Get the labels text property.
static vtkParallelCoordinatesActor * New()
Instantiate object with autorange computation; the number of labels set to 5 for the x and y axes; a ...
virtual void SetInputConnection(vtkAlgorithmOutput *)
Set the input to the parallel coordinates actor.
~vtkParallelCoordinatesActor() override
virtual void SetTitleTextProperty(vtkTextProperty *p)
Set/Get the title text property.
void ReleaseGraphicsResources(vtkWindow *) override
Release any graphics resources that are being consumed by this actor.
int RenderOverlay(vtkViewport *) override
Draw the parallel coordinates plot.
virtual void SetInputData(vtkDataObject *)
Set the input to the parallel coordinates actor.
void SetIndependentVariablesToRows()
Specify whether to use the rows or columns as independent variables.
void SetIndependentVariablesToColumns()
Specify whether to use the rows or columns as independent variables.
int RenderOpaqueGeometry(vtkViewport *) override
Draw the parallel coordinates plot.
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
int RenderTranslucentPolygonalGeometry(vtkViewport *) override
Draw the parallel coordinates plot.
draw vtkPolyData onto the image plane
concrete dataset represents vertices, lines, polygons, and triangle strips
Definition vtkPolyData.h:80
2D text annotation
represent text properties.
record modification and/or execution time
abstract specification for Viewports
Definition vtkViewport.h:45
window superclass for vtkRenderWindow
Definition vtkWindow.h:25
int vtkTypeBool
Definition vtkABI.h:64
#define VTK_IV_ROW
#define VTK_IV_COLUMN
int vtkIdType
Definition vtkType.h:315