VTK  9.2.20230528
vtkParallelCoordinatesActor.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkParallelCoordinatesActor.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 =========================================================================*/
63 #ifndef vtkParallelCoordinatesActor_h
64 #define vtkParallelCoordinatesActor_h
65 
66 #include "vtkActor2D.h"
67 #include "vtkRenderingAnnotationModule.h" // For export macro
68 
69 VTK_ABI_NAMESPACE_BEGIN
70 class vtkAlgorithmOutput;
71 class vtkAxisActor2D;
72 class vtkDataObject;
73 class vtkPolyData;
75 class vtkTextMapper;
76 class vtkTextProperty;
77 class vtkParallelCoordinatesActorConnection;
78 
79 #define VTK_IV_COLUMN 0
80 #define VTK_IV_ROW 1
81 
82 class VTKRENDERINGANNOTATION_EXPORT vtkParallelCoordinatesActor : public vtkActor2D
83 {
84 public:
86  void PrintSelf(ostream& os, vtkIndent indent) override;
87 
95 
97 
102  vtkSetClampMacro(IndependentVariables, int, VTK_IV_COLUMN, VTK_IV_ROW);
103  vtkGetMacro(IndependentVariables, int);
104  void SetIndependentVariablesToColumns() { this->SetIndependentVariables(VTK_IV_COLUMN); }
105  void SetIndependentVariablesToRows() { this->SetIndependentVariables(VTK_IV_ROW); }
107 
109 
112  vtkSetStringMacro(Title);
113  vtkGetStringMacro(Title);
115 
117 
122  vtkSetClampMacro(NumberOfLabels, int, 0, 50);
123  vtkGetMacro(NumberOfLabels, int);
125 
127 
130  vtkSetStringMacro(LabelFormat);
131  vtkGetStringMacro(LabelFormat);
133 
135 
139  vtkGetObjectMacro(TitleTextProperty, vtkTextProperty);
141 
143 
147  vtkGetObjectMacro(LabelTextProperty, vtkTextProperty);
149 
151 
155  int RenderOverlay(vtkViewport*) override;
156  int RenderTranslucentPolygonalGeometry(vtkViewport*) override { return 0; }
158 
163 
169 
174  virtual void SetInputData(vtkDataObject*);
175 
180 
187 
188 protected:
191 
192 private:
193  vtkParallelCoordinatesActorConnection* ConnectionHolder;
194 
195  int IndependentVariables; // Use column or row
196  vtkIdType N; // The number of independent variables
197  double* Mins; // Minimum data value along this row/column
198  double* Maxs; // Maximum data value along this row/column
199  int* Xs; // Axes x-values (in viewport coordinates)
200  int YMin; // Axes y-min-value (in viewport coordinates)
201  int YMax; // Axes y-max-value (in viewport coordinates)
202  int NumberOfLabels; // Along each axis
203  char* LabelFormat;
204  char* Title;
205 
206  vtkAxisActor2D** Axes;
207  vtkTextMapper* TitleMapper;
208  vtkActor2D* TitleActor;
209 
210  vtkTextProperty* TitleTextProperty;
211  vtkTextProperty* LabelTextProperty;
212 
213  vtkPolyData* PlotData; // The lines drawn within the axes
214  vtkPolyDataMapper2D* PlotMapper;
215  vtkActor2D* PlotActor;
216 
217  vtkTimeStamp BuildTime;
218 
219  int LastPosition[2];
220  int LastPosition2[2];
221 
222  void Initialize();
223  int PlaceAxes(vtkViewport* viewport, const int* size);
224 
226  void operator=(const vtkParallelCoordinatesActor&) = delete;
227 };
228 
229 VTK_ABI_NAMESPACE_END
230 #endif
a actor that draws 2D data
Definition: vtkActor2D.h:156
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:120
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:201
2D text annotation
represent text properties.
record modification and/or execution time
Definition: vtkTimeStamp.h:56
abstract specification for Viewports
Definition: vtkViewport.h:57
window superclass for vtkRenderWindow
Definition: vtkWindow.h:40
@ size
Definition: vtkX3D.h:265
int vtkTypeBool
Definition: vtkABI.h:71
#define VTK_IV_ROW
#define VTK_IV_COLUMN
int vtkIdType
Definition: vtkType.h:327