VTK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
vtkParallelCoordinatesRepresentation.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkParallelCoordinatesRepresentation.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 =========================================================================*/
15 /*-------------------------------------------------------------------------
16  Copyright 2009 Sandia Corporation.
17  Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
18  the U.S. Government retains certain rights in this software.
19 -------------------------------------------------------------------------*/
49 #ifndef __vtkParallelCoordinatesRepresentation_h
50 #define __vtkParallelCoordinatesRepresentation_h
51 
52 #include "vtkViewsInfovisModule.h" // For export macro
54 
55 class vtkActor;
56 class vtkActor2D;
57 class vtkArrayData;
58 class vtkAxisActor2D;
59 class vtkBivariateLinearTableThreshold;
60 class vtkCollection;
61 class vtkCoordinate;
62 class vtkExtractSelectedPolyDataIds;
63 class vtkFieldData;
64 class vtkDataArray;
65 class vtkDataObject;
66 class vtkDoubleArray;
67 class vtkIdList;
68 class vtkIdTypeArray;
69 class vtkIntArray;
70 class vtkLookupTable;
71 class vtkOutlineCornerSource;
72 class vtkPoints;
73 class vtkPolyData;
74 class vtkPolyDataMapper2D;
75 class vtkPropCollection;
76 class vtkSelection;
77 class vtkSelectionNode;
78 class vtkTextMapper;
79 class vtkTimeStamp;
81 class vtkViewport;
82 class vtkWindow;
83 
85 {
86 public:
89  void PrintSelf(ostream& os, vtkIndent indent);
90 
94  virtual void ApplyViewTheme(vtkViewTheme* theme);
95 
97  virtual const char* GetHoverText(vtkView* view, int x, int y);
98 
100 
101  int SetPositionAndSize(double* position, double* size);
102  int GetPositionAndSize(double* position, double* size);
104 
106 
107  void SetAxisTitles(vtkStringArray*);
108  void SetAxisTitles(vtkAlgorithmOutput*);
110 
112  void SetPlotTitle(const char*);
113 
115 
116  vtkGetMacro(NumberOfAxes,int);
118 
120 
121  vtkGetMacro(NumberOfSamples,int);
123 
125 
126  void SetNumberOfAxisLabels(int num);
127  vtkGetMacro(NumberOfAxisLabels,int);
129 
131 
133  virtual int SwapAxisPositions(int position1, int position2);
134  int SetXCoordinateOfPosition(int position, double xcoord);
135  double GetXCoordinateOfPosition(int axis);
136  void GetXCoordinatesOfPositions(double* coords);
137  int GetPositionNearXCoordinate(double xcoord);
139 
141 
142  vtkSetMacro(UseCurves,int);
143  vtkGetMacro(UseCurves,int);
144  vtkBooleanMacro(UseCurves,int);
146 
148 
149  vtkSetMacro(CurveResolution,int);
150  vtkGetMacro(CurveResolution,int);
152 
154 
155  vtkGetMacro(LineOpacity,double)
156  vtkGetMacro(FontSize,double);
157  vtkGetVector3Macro(LineColor,double);
158  vtkGetVector3Macro(AxisColor,double);
159  vtkGetVector3Macro(AxisLabelColor,double);
160  vtkSetMacro(LineOpacity,double);
161  vtkSetMacro(FontSize,double);
162  vtkSetVector3Macro(LineColor,double);
163  vtkSetVector3Macro(AxisColor,double);
164  vtkSetVector3Macro(AxisLabelColor,double);
166 
168 
170  vtkSetMacro(AngleBrushThreshold,double);
171  vtkGetMacro(AngleBrushThreshold,double);
173 
175 
177  vtkSetMacro(FunctionBrushThreshold,double);
178  vtkGetMacro(FunctionBrushThreshold,double);
180 
182 
183  int GetRangeAtPosition(int position, double range[2]);
184  virtual int SetRangeAtPosition(int position, double range[2]);
186 
188  void ResetAxes();
189 
191 
193  virtual void LassoSelect(int brushClass, int brushOperator, vtkPoints* brushPoints);
194  virtual void AngleSelect(int brushClass, int brushOperator, double *p1, double *p2);
195  virtual void FunctionSelect(int brushClass, int brushOperator, double *p1, double *p2, double *q1, double *q2);
196  virtual void RangeSelect(int brushClass, int brushOperator, double *p1, double *p2);
198 
199 //BTX
201  {
202  INPUT_DATA=0,
204  NUM_INPUT_PORTS
205  };
206 //ETX
207 
208 protected:
211 
212  virtual int FillInputPortInformation(int port, vtkInformation* info);
213 
214  virtual int RequestData(
218 
220 
221  virtual bool AddToView(vtkView* view);
222  virtual bool RemoveFromView(vtkView* view);
223  virtual void PrepareForRendering(vtkRenderView* view);
225 
228  void UpdateHoverHighlight(vtkView* view, int x, int y);
229 
231 
232  virtual int AllocatePolyData(vtkPolyData* polyData,
233  int numLines,
234  int numPointsPerLine,
235  int numStrips,
236  int numPointsPerStrip,
237  int numQuads,
238  int numPoints,
239  int numCellScalars,
240  int numPointScalars);
242 
244  int PlaceAxes();
245 
247 
250  virtual int PlaceLines(vtkPolyData* polyData, vtkTable* data, vtkIdTypeArray* idsToPlot);
251  virtual int PlaceCurves(vtkPolyData* polyData, vtkTable* data, vtkIdTypeArray* idsToPlot);
253 
257  virtual int PlaceSelection(vtkPolyData* polyData, vtkTable* data, vtkSelectionNode* selectionNode);
258 
260  virtual int ComputeDataProperties();
261 
263  virtual int UpdatePlotProperties(vtkStringArray* inputTitles);
264 
266  virtual int ReallocateInternals();
267 
269 
271  int ComputePointPosition(double* p);
272  int ComputeLinePosition(double* p1, double* p2);
274 
276 
278  virtual void SelectRows(vtkIdType brushClass, vtkIdType brushOperator, vtkIdTypeArray* rowIds);
279  virtual vtkSelection* ConvertSelection(vtkView* view, vtkSelection* selection);
280  virtual void BuildInverseSelection();
281  virtual vtkPolyDataMapper2D* InitializePlotMapper(vtkPolyData* input, vtkActor2D* actor, bool forceStandard=false);
283 
287  void BuildDefaultSCurve(vtkDoubleArray* array, int numValues);
288 
291  virtual void LassoSelectInternal(vtkPoints* brushPoints, vtkIdTypeArray* outIds);
292 
294  virtual void UpdateSelectionActors();
295 
296  vtkPolyDataMapper2D* GetSelectionMapper(int idx);
297  int GetNumberOfSelections();
298 
299 
300  //BTX
308 
311 
312  class Internals;
313  Internals* I;
314  //ETX
315 
319  double YMin;
320  double YMax;
321 
327 
328  // Indexed by screen position
329  double* Xs;
330  double* Mins;
331  double* Maxs;
332  double* MinOffsets;
333  double* MaxOffsets;
334 
335  //BTX
339  //ETX
340 
342 
343  double LineOpacity;
344  double FontSize;
345  double LineColor[3];
346  double AxisColor[3];
347  double AxisLabelColor[3];
348 
349  vtkGetStringMacro(InternalHoverText);
350  vtkSetStringMacro(InternalHoverText);
351  char* InternalHoverText;
352 
353 private:
355  void operator=(const vtkParallelCoordinatesRepresentation&); // Not implemented
356 };
357 
358 #endif
359 
A node in a selection tree. Used to store selection results.
virtual void ApplyViewTheme(vtkViewTheme *vtkNotUsed(theme))
virtual vtkSelection * ConvertSelection(vtkView *view, vtkSelection *selection)
dynamic, self-adjusting array of unsigned int
Store vtkAlgorithm input/output information.
record modification and/or execution time
Definition: vtkTimeStamp.h:34
void PrintSelf(ostream &os, vtkIndent indent)
map scalar values into colors via a lookup table
a vtkAbstractArray subclass for strings
A node in a selection tree. Used to store selection results.
Definition: vtkSelection.h:44
dynamic, self-adjusting array of vtkIdType
int vtkIdType
Definition: vtkType.h:268
virtual bool AddToView(vtkView *vtkNotUsed(view))
Pipeline data object that contains multiple vtkArray objects.
Definition: vtkArrayData.h:51
static vtkRenderedRepresentation * New()
Proxy object to connect input/output ports.
dynamic, self-adjusting array of double
window superclass for vtkRenderWindow
Definition: vtkWindow.h:36
Sets theme colors for a graphical view.
Definition: vtkViewTheme.h:47
dynamic, self-adjusting array of int
Definition: vtkIntArray.h:43
virtual int FillInputPortInformation(int port, vtkInformation *info)
The superclass for all views.
Definition: vtkView.h:62
a simple class to control print indentation
Definition: vtkIndent.h:38
virtual bool RemoveFromView(vtkView *vtkNotUsed(view))
vtkUnicodeString GetHoverText(vtkView *view, vtkProp *prop, vtkIdType cell)
virtual void PrepareForRendering(vtkRenderView *view)
list of point or cell ids
Definition: vtkIdList.h:35
abstract superclass for arrays of numeric data
Definition: vtkDataArray.h:53
virtual int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *)
vtkSmartPointer< vtkBivariateLinearTableThreshold > LinearThreshold
A table, which contains similar-typed columns of data.
Definition: vtkTable.h:67
vtkSmartPointer< vtkPolyDataMapper2D > PlotMapper
create and manipulate unsorted lists of objects
Definition: vtkCollection.h:52
A view containing a renderer.
Definition: vtkRenderView.h:63
Store zero or more vtkInformation instances.
helper class to get VTK data object types as string and instantiate them
represent and manipulate 3D points
Definition: vtkPoints.h:39
Data representation that takes generic multivariate data and produces a parallel coordinates plot...
represent and manipulate fields of data
Definition: vtkFieldData.h:55