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 =========================================================================*/
62 #ifndef __vtkParallelCoordinatesActor_h
63 #define __vtkParallelCoordinatesActor_h
64 
65 #include "vtkActor2D.h"
66 
67 class vtkAxisActor2D;
68 class vtkDataObject;
69 class vtkPolyData;
71 class vtkTextMapper;
72 class vtkTextProperty;
73 
74 #define VTK_IV_COLUMN 0
75 #define VTK_IV_ROW 1
76 
78 {
79 public:
81  void PrintSelf(ostream& os, vtkIndent indent);
82 
87 
89 
92  vtkSetClampMacro(IndependentVariables,int,VTK_IV_COLUMN, VTK_IV_ROW);
93  vtkGetMacro(IndependentVariables,int);
95  {this->SetIndependentVariables(VTK_IV_COLUMN);};
97  {this->SetIndependentVariables(VTK_IV_ROW);};
99 
101 
102  vtkSetStringMacro(Title);
103  vtkGetStringMacro(Title);
105 
107 
110  vtkSetClampMacro(NumberOfLabels, int, 0, 50);
111  vtkGetMacro(NumberOfLabels, int);
113 
115 
116  vtkSetStringMacro(LabelFormat);
117  vtkGetStringMacro(LabelFormat);
119 
121 
122  virtual void SetTitleTextProperty(vtkTextProperty *p);
123  vtkGetObjectMacro(TitleTextProperty,vtkTextProperty);
125 
127 
128  virtual void SetLabelTextProperty(vtkTextProperty *p);
129  vtkGetObjectMacro(LabelTextProperty,vtkTextProperty);
131 
133 
138 
140  virtual int HasTranslucentPolygonalGeometry();
141 
143  virtual void SetInput(vtkDataObject*);
144 
146 
147  vtkGetObjectMacro(Input,vtkDataObject);
149 
154 
155 protected:
158 
159 private:
160  vtkDataObject *Input; // List of data sets to plot
161 
162  int IndependentVariables; // Use column or row
163  vtkIdType N; // The number of independent variables
164  double *Mins; // Minimum data value along this row/column
165  double *Maxs; // Maximum data value along this row/column
166  int *Xs; // Axes x-values (in viewport coordinates)
167  int YMin; // Axes y-min-value (in viewport coordinates)
168  int YMax; // Axes y-max-value (in viewport coordinates)
169  int NumberOfLabels; // Along each axis
170  char *LabelFormat;
171  char *Title;
172 
173  vtkAxisActor2D **Axes;
174  vtkTextMapper *TitleMapper;
175  vtkActor2D *TitleActor;
176 
177  vtkTextProperty *TitleTextProperty;
178  vtkTextProperty *LabelTextProperty;
179 
180  vtkPolyData *PlotData; // The lines drawn within the axes
181  vtkPolyDataMapper2D *PlotMapper;
182  vtkActor2D *PlotActor;
183 
184  vtkTimeStamp BuildTime;
185 
186  int LastPosition[2];
187  int LastPosition2[2];
188 
189  void Initialize();
190  int PlaceAxes(vtkViewport *viewport, int *size);
191 
192 private:
193  vtkParallelCoordinatesActor(const vtkParallelCoordinatesActor&); // Not implemented.
194  void operator=(const vtkParallelCoordinatesActor&); // Not implemented.
195 };
196 
197 
198 #endif
199