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 =========================================================================*/
60 #ifndef vtkParallelCoordinatesActor_h
61 #define vtkParallelCoordinatesActor_h
62 
63 #include "vtkRenderingAnnotationModule.h" // For export macro
64 #include "vtkActor2D.h"
65 
66 class vtkAlgorithmOutput;
67 class vtkAxisActor2D;
68 class vtkDataObject;
69 class vtkPolyData;
71 class vtkTextMapper;
72 class vtkTextProperty;
73 class vtkParallelCoordinatesActorConnection;
74 
75 #define VTK_IV_COLUMN 0
76 #define VTK_IV_ROW 1
77 
78 class VTKRENDERINGANNOTATION_EXPORT vtkParallelCoordinatesActor : public vtkActor2D
79 {
80 public:
82  void PrintSelf(ostream& os, vtkIndent indent) VTK_OVERRIDE;
83 
91 
93 
98  vtkSetClampMacro(IndependentVariables,int,VTK_IV_COLUMN, VTK_IV_ROW);
99  vtkGetMacro(IndependentVariables,int);
101  {this->SetIndependentVariables(VTK_IV_COLUMN);};
103  {this->SetIndependentVariables(VTK_IV_ROW);};
105 
107 
110  vtkSetStringMacro(Title);
111  vtkGetStringMacro(Title);
113 
115 
120  vtkSetClampMacro(NumberOfLabels, int, 0, 50);
121  vtkGetMacro(NumberOfLabels, int);
123 
125 
128  vtkSetStringMacro(LabelFormat);
129  vtkGetStringMacro(LabelFormat);
131 
133 
136  virtual void SetTitleTextProperty(vtkTextProperty *p);
137  vtkGetObjectMacro(TitleTextProperty,vtkTextProperty);
139 
141 
144  virtual void SetLabelTextProperty(vtkTextProperty *p);
145  vtkGetObjectMacro(LabelTextProperty,vtkTextProperty);
147 
149 
152  int RenderOpaqueGeometry(vtkViewport*) VTK_OVERRIDE;
153  int RenderOverlay(vtkViewport*) VTK_OVERRIDE;
154  int RenderTranslucentPolygonalGeometry(vtkViewport *) VTK_OVERRIDE {return 0;}
156 
160  int HasTranslucentPolygonalGeometry() VTK_OVERRIDE;
161 
166  virtual void SetInputConnection(vtkAlgorithmOutput*);
167 
172  virtual void SetInputData(vtkDataObject*);
173 
177  vtkDataObject* GetInput();
178 
184  void ReleaseGraphicsResources(vtkWindow *) VTK_OVERRIDE;
185 
186 protected:
188  ~vtkParallelCoordinatesActor() VTK_OVERRIDE;
189 
190 private:
191 
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 
217 
218  int LastPosition[2];
219  int LastPosition2[2];
220 
221  void Initialize();
222  int PlaceAxes(vtkViewport *viewport, int *size);
223 
224 private:
225  vtkParallelCoordinatesActor(const vtkParallelCoordinatesActor&) VTK_DELETE_FUNCTION;
226  void operator=(const vtkParallelCoordinatesActor&) VTK_DELETE_FUNCTION;
227 };
228 
229 
230 #endif
231 
vtkTimeStamp BuildTime
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:39
record modification and/or execution time
Definition: vtkTimeStamp.h:32
Create an axis with tick marks and labels.
int vtkIdType
Definition: vtkType.h:345
concrete dataset represents vertices, lines, polygons, and triangle strips
Definition: vtkPolyData.h:79
#define VTK_IV_COLUMN
2D text annotation
Definition: vtkTextMapper.h:47
Proxy object to connect input/output ports.
void SetIndependentVariablesToRows()
Specify whether to use the rows or columns as independent variables.
window superclass for vtkRenderWindow
Definition: vtkWindow.h:34
int RenderTranslucentPolygonalGeometry(vtkViewport *) override
Draw the parallel coordinates plot.
void SetIndependentVariablesToColumns()
Specify whether to use the rows or columns as independent variables.
a simple class to control print indentation
Definition: vtkIndent.h:33
int HasTranslucentPolygonalGeometry() override
Does this prop have some translucent polygonal geometry?
static vtkActor2D * New()
Creates an actor2D with the following defaults: position (0,0) (coordinate system is viewport); at la...
#define VTK_IV_ROW
vtkGetStringMacro(ExtensionsString)
Returns a string listing all available extensions.
represent text properties.
int RenderOpaqueGeometry(vtkViewport *viewport) override
Support the standard render methods.
general representation of visualization data
Definition: vtkDataObject.h:58
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.