VTK  9.3.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 
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 
126  virtual void SetTitleTextProperty(vtkTextProperty* p);
127  vtkGetObjectMacro(TitleTextProperty, vtkTextProperty);
129 
131 
134  virtual void SetLabelTextProperty(vtkTextProperty* p);
135  vtkGetObjectMacro(LabelTextProperty, vtkTextProperty);
137 
139 
142  int RenderOpaqueGeometry(vtkViewport*) override;
143  int RenderOverlay(vtkViewport*) override;
144  int RenderTranslucentPolygonalGeometry(vtkViewport*) override { return 0; }
146 
151 
156  virtual void SetInputConnection(vtkAlgorithmOutput*);
157 
162  virtual void SetInputData(vtkDataObject*);
163 
167  vtkDataObject* GetInput();
168 
174  void ReleaseGraphicsResources(vtkWindow*) override;
175 
176 protected:
178  ~vtkParallelCoordinatesActor() override;
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
int RenderOverlay(vtkViewport *viewport) override
Support the standard render methods.
abstract specification for Viewports
Definition: vtkViewport.h:44
create parallel coordinate display from input field
a actor that draws 2D data
Definition: vtkActor2D.h:34
record modification and/or execution time
Definition: vtkTimeStamp.h:24
Create an axis with tick marks and labels.
int vtkIdType
Definition: vtkType.h:315
concrete dataset represents vertices, lines, polygons, and triangle strips
Definition: vtkPolyData.h:79
#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:27
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.
general representation of visualization data
Definition: vtkDataObject.h:54
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.