VTK  9.3.20231204
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 
57 VTK_ABI_NAMESPACE_BEGIN
58 class vtkAlgorithmOutput;
59 class vtkAxisActor2D;
60 class vtkDataObject;
61 class vtkPolyData;
63 class vtkTextMapper;
64 class vtkTextProperty;
65 class vtkParallelCoordinatesActorConnection;
66 
67 #define VTK_IV_COLUMN 0
68 #define VTK_IV_ROW 1
69 
70 class VTKRENDERINGANNOTATION_EXPORT vtkParallelCoordinatesActor : public vtkActor2D
71 {
72 public:
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 
143  int RenderOverlay(vtkViewport*) override;
144  int RenderTranslucentPolygonalGeometry(vtkViewport*) override { return 0; }
146 
151 
157 
162  virtual void SetInputData(vtkDataObject*);
163 
168 
175 
176 protected:
179 
180 private:
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 
217 VTK_ABI_NAMESPACE_END
218 #endif
a actor that draws 2D data
Definition: vtkActor2D.h:144
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:108
create parallel coordinate display from input field
vtkDataObject * GetInput()
Remove a dataset from the list of data to append.
static vtkParallelCoordinatesActor * New()
Instantiate object with autorange computation; the number of labels set to 5 for the x and y axes; a ...
vtkTypeBool HasTranslucentPolygonalGeometry() override
Does this prop have some translucent polygonal geometry?
virtual void SetLabelTextProperty(vtkTextProperty *p)
Set/Get the labels text property.
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:180
2D text annotation
represent text properties.
record modification and/or execution time
Definition: vtkTimeStamp.h:44
abstract specification for Viewports
Definition: vtkViewport.h:64
window superclass for vtkRenderWindow
Definition: vtkWindow.h:47
@ size
Definition: vtkX3D.h:253
int vtkTypeBool
Definition: vtkABI.h:64
#define VTK_IV_ROW
#define VTK_IV_COLUMN
int vtkIdType
Definition: vtkType.h:315