VTK  9.2.6
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 class vtkAlgorithmOutput;
70 class vtkAxisActor2D;
71 class vtkDataObject;
72 class vtkPolyData;
74 class vtkTextMapper;
75 class vtkTextProperty;
76 class vtkParallelCoordinatesActorConnection;
77 
78 #define VTK_IV_COLUMN 0
79 #define VTK_IV_ROW 1
80 
81 class VTKRENDERINGANNOTATION_EXPORT vtkParallelCoordinatesActor : public vtkActor2D
82 {
83 public:
85  void PrintSelf(ostream& os, vtkIndent indent) override;
86 
94 
96 
101  vtkSetClampMacro(IndependentVariables, int, VTK_IV_COLUMN, VTK_IV_ROW);
102  vtkGetMacro(IndependentVariables, int);
103  void SetIndependentVariablesToColumns() { this->SetIndependentVariables(VTK_IV_COLUMN); }
104  void SetIndependentVariablesToRows() { this->SetIndependentVariables(VTK_IV_ROW); }
106 
108 
111  vtkSetStringMacro(Title);
112  vtkGetStringMacro(Title);
114 
116 
121  vtkSetClampMacro(NumberOfLabels, int, 0, 50);
122  vtkGetMacro(NumberOfLabels, int);
124 
126 
129  vtkSetStringMacro(LabelFormat);
130  vtkGetStringMacro(LabelFormat);
132 
134 
137  virtual void SetTitleTextProperty(vtkTextProperty* p);
138  vtkGetObjectMacro(TitleTextProperty, vtkTextProperty);
140 
142 
145  virtual void SetLabelTextProperty(vtkTextProperty* p);
146  vtkGetObjectMacro(LabelTextProperty, vtkTextProperty);
148 
150 
153  int RenderOpaqueGeometry(vtkViewport*) override;
154  int RenderOverlay(vtkViewport*) override;
155  int RenderTranslucentPolygonalGeometry(vtkViewport*) override { return 0; }
157 
162 
167  virtual void SetInputConnection(vtkAlgorithmOutput*);
168 
173  virtual void SetInputData(vtkDataObject*);
174 
178  vtkDataObject* GetInput();
179 
185  void ReleaseGraphicsResources(vtkWindow*) override;
186 
187 protected:
189  ~vtkParallelCoordinatesActor() override;
190 
191 private:
192  vtkParallelCoordinatesActorConnection* ConnectionHolder;
193 
194  int IndependentVariables; // Use column or row
195  vtkIdType N; // The number of independent variables
196  double* Mins; // Minimum data value along this row/column
197  double* Maxs; // Maximum data value along this row/column
198  int* Xs; // Axes x-values (in viewport coordinates)
199  int YMin; // Axes y-min-value (in viewport coordinates)
200  int YMax; // Axes y-max-value (in viewport coordinates)
201  int NumberOfLabels; // Along each axis
202  char* LabelFormat;
203  char* Title;
204 
205  vtkAxisActor2D** Axes;
206  vtkTextMapper* TitleMapper;
207  vtkActor2D* TitleActor;
208 
209  vtkTextProperty* TitleTextProperty;
210  vtkTextProperty* LabelTextProperty;
211 
212  vtkPolyData* PlotData; // The lines drawn within the axes
213  vtkPolyDataMapper2D* PlotMapper;
214  vtkActor2D* PlotActor;
215 
216  vtkTimeStamp BuildTime;
217 
218  int LastPosition[2];
219  int LastPosition2[2];
220 
221  void Initialize();
222  int PlaceAxes(vtkViewport* viewport, const int* size);
223 
224 private:
226  void operator=(const vtkParallelCoordinatesActor&) = delete;
227 };
228 
229 #endif
int RenderOverlay(vtkViewport *viewport) override
Support the standard render methods.
abstract specification for Viewports
Definition: vtkViewport.h:55
create parallel coordinate display from input field
a actor that draws 2D data
Definition: vtkActor2D.h:45
record modification and/or execution time
Definition: vtkTimeStamp.h:35
Create an axis with tick marks and labels.
int vtkIdType
Definition: vtkType.h:332
concrete dataset represents vertices, lines, polygons, and triangle strips
Definition: vtkPolyData.h:90
#define VTK_IV_COLUMN
2D text annotation
Definition: vtkTextMapper.h:50
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:69
window superclass for vtkRenderWindow
Definition: vtkWindow.h:38
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:39
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.
general representation of visualization data
Definition: vtkDataObject.h:65
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.