VTK
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 "vtkRenderingAnnotationModule.h" // For export macro
67 #include "vtkActor2D.h"
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);
104  {this->SetIndependentVariables(VTK_IV_COLUMN);};
106  {this->SetIndependentVariables(VTK_IV_ROW);};
108 
110 
113  vtkSetStringMacro(Title);
114  vtkGetStringMacro(Title);
116 
118 
123  vtkSetClampMacro(NumberOfLabels, int, 0, 50);
124  vtkGetMacro(NumberOfLabels, int);
126 
128 
131  vtkSetStringMacro(LabelFormat);
132  vtkGetStringMacro(LabelFormat);
134 
136 
139  virtual void SetTitleTextProperty(vtkTextProperty *p);
140  vtkGetObjectMacro(TitleTextProperty,vtkTextProperty);
142 
144 
147  virtual void SetLabelTextProperty(vtkTextProperty *p);
148  vtkGetObjectMacro(LabelTextProperty,vtkTextProperty);
150 
152 
155  int RenderOpaqueGeometry(vtkViewport*) override;
156  int RenderOverlay(vtkViewport*) override;
159 
164 
169  virtual void SetInputConnection(vtkAlgorithmOutput*);
170 
175  virtual void SetInputData(vtkDataObject*);
176 
180  vtkDataObject* GetInput();
181 
187  void ReleaseGraphicsResources(vtkWindow *) override;
188 
189 protected:
191  ~vtkParallelCoordinatesActor() override;
192 
193 private:
194 
195  vtkParallelCoordinatesActorConnection* ConnectionHolder;
196 
197  int IndependentVariables; // Use column or row
198  vtkIdType N; // The number of independent variables
199  double *Mins; // Minimum data value along this row/column
200  double *Maxs; // Maximum data value along this row/column
201  int *Xs; // Axes x-values (in viewport coordinates)
202  int YMin; // Axes y-min-value (in viewport coordinates)
203  int YMax; // Axes y-max-value (in viewport coordinates)
204  int NumberOfLabels; // Along each axis
205  char *LabelFormat;
206  char *Title;
207 
208  vtkAxisActor2D **Axes;
209  vtkTextMapper *TitleMapper;
210  vtkActor2D *TitleActor;
211 
212  vtkTextProperty *TitleTextProperty;
213  vtkTextProperty *LabelTextProperty;
214 
215  vtkPolyData *PlotData; // The lines drawn within the axes
216  vtkPolyDataMapper2D *PlotMapper;
217  vtkActor2D *PlotActor;
218 
219  vtkTimeStamp BuildTime;
220 
221  int LastPosition[2];
222  int LastPosition2[2];
223 
224  void Initialize();
225  int PlaceAxes(vtkViewport *viewport, int *size);
226 
227 private:
229  void operator=(const vtkParallelCoordinatesActor&) = delete;
230 };
231 
232 
233 #endif
234 
int RenderOverlay(vtkViewport *viewport) override
Support the standard render methods.
abstract specification for Viewports
Definition: vtkViewport.h:47
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:347
concrete dataset represents vertices, lines, polygons, and triangle strips
Definition: vtkPolyData.h:85
#define VTK_IV_COLUMN
2D text annotation
Definition: vtkTextMapper.h:53
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:37
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:64
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.