VTK
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 
53 
54 class vtkActor;
55 class vtkActor2D;
56 class vtkArrayData;
57 class vtkAxisActor2D;
59 class vtkCollection;
60 class vtkCoordinate;
62 class vtkFieldData;
63 class vtkDataArray;
64 class vtkDataObject;
65 class vtkDoubleArray;
66 class vtkIdList;
67 class vtkIdTypeArray;
68 class vtkIntArray;
69 class vtkLookupTable;
71 class vtkPoints;
72 class vtkPolyData;
74 class vtkPropCollection;
75 class vtkSelection;
76 class vtkSelectionNode;
77 class vtkTextMapper;
78 class vtkTimeStamp;
80 class vtkViewport;
81 class vtkWindow;
82 
84 {
85 public:
88  void PrintSelf(ostream& os, vtkIndent indent);
89 
93  virtual void ApplyViewTheme(vtkViewTheme* theme);
94 
96  virtual const char* GetHoverText(vtkView* view, int x, int y);
97 
99 
100  int SetPositionAndSize(double* position, double* size);
101  int GetPositionAndSize(double* position, double* size);
103 
105 
106  void SetAxisTitles(vtkStringArray*);
107  void SetAxisTitles(vtkAlgorithmOutput*);
109 
111  void SetPlotTitle(const char*);
112 
114 
115  vtkGetMacro(NumberOfAxes,int);
117 
119 
120  vtkGetMacro(NumberOfSamples,int);
122 
124 
125  void SetNumberOfAxisLabels(int num);
126  vtkGetMacro(NumberOfAxisLabels,int);
128 
130 
132  virtual int SwapAxisPositions(int position1, int position2);
133  int SetXCoordinateOfPosition(int position, double xcoord);
134  double GetXCoordinateOfPosition(int axis);
135  void GetXCoordinatesOfPositions(double* coords);
136  int GetPositionNearXCoordinate(double xcoord);
138 
140 
141  vtkSetMacro(UseCurves,int);
142  vtkGetMacro(UseCurves,int);
143  vtkBooleanMacro(UseCurves,int);
145 
147 
148  vtkSetMacro(CurveResolution,int);
149  vtkGetMacro(CurveResolution,int);
151 
153 
154  vtkGetMacro(LineOpacity,double)
155  vtkGetMacro(FontSize,double);
156  vtkGetVector3Macro(LineColor,double);
157  vtkGetVector3Macro(AxisColor,double);
158  vtkGetVector3Macro(AxisLabelColor,double);
159  vtkSetMacro(LineOpacity,double);
160  vtkSetMacro(FontSize,double);
161  vtkSetVector3Macro(LineColor,double);
162  vtkSetVector3Macro(AxisColor,double);
163  vtkSetVector3Macro(AxisLabelColor,double);
165 
167 
169  vtkSetMacro(AngleBrushThreshold,double);
170  vtkGetMacro(AngleBrushThreshold,double);
172 
174 
176  vtkSetMacro(FunctionBrushThreshold,double);
177  vtkGetMacro(FunctionBrushThreshold,double);
179 
181 
182  int GetRangeAtPosition(int position, double range[2]);
183  virtual int SetRangeAtPosition(int position, double range[2]);
185 
187  void ResetAxes();
188 
190 
192  virtual void LassoSelect(int brushClass, int brushOperator, vtkPoints* brushPoints);
193  virtual void AngleSelect(int brushClass, int brushOperator, double *p1, double *p2);
194  virtual void FunctionSelect(int brushClass, int brushOperator, double *p1, double *p2, double *q1, double *q2);
195  virtual void RangeSelect(int brushClass, int brushOperator, double *p1, double *p2);
197 
198 //BTX
200  {
201  INPUT_DATA=0,
203  NUM_INPUT_PORTS
204  };
205 //ETX
206 
207 protected:
210 
212 
213  virtual int RequestData(
217 
219 
220  virtual bool AddToView(vtkView* view);
221  virtual bool RemoveFromView(vtkView* view);
222  virtual void PrepareForRendering(vtkRenderView* view);
224 
227  void UpdateHoverHighlight(vtkView* view, int x, int y);
228 
230 
231  virtual int AllocatePolyData(vtkPolyData* polyData,
232  int numLines,
233  int numPointsPerLine,
234  int numStrips,
235  int numPointsPerStrip,
236  int numQuads,
237  int numPoints,
238  int numCellScalars,
239  int numPointScalars);
241 
243  int PlaceAxes();
244 
246 
249  virtual int PlaceLines(vtkPolyData* polyData, vtkTable* data, vtkIdTypeArray* idsToPlot);
250  virtual int PlaceCurves(vtkPolyData* polyData, vtkTable* data, vtkIdTypeArray* idsToPlot);
252 
256  virtual int PlaceSelection(vtkPolyData* polyData, vtkTable* data, vtkSelectionNode* selectionNode);
257 
259  virtual int ComputeDataProperties();
260 
262  virtual int UpdatePlotProperties(vtkStringArray* inputTitles);
263 
265  virtual int ReallocateInternals();
266 
268 
270  int ComputePointPosition(double* p);
271  int ComputeLinePosition(double* p1, double* p2);
273 
275 
277  virtual void SelectRows(vtkIdType brushClass, vtkIdType brushOperator, vtkIdTypeArray* rowIds);
278  virtual vtkSelection* ConvertSelection(vtkView* view, vtkSelection* selection);
279  virtual void BuildInverseSelection();
280  virtual vtkPolyDataMapper2D* InitializePlotMapper(vtkPolyData* input, vtkActor2D* actor, bool forceStandard=false);
282 
286  void BuildDefaultSCurve(vtkDoubleArray* array, int numValues);
287 
290  virtual void LassoSelectInternal(vtkPoints* brushPoints, vtkIdTypeArray* outIds);
291 
293  virtual void UpdateSelectionActors();
294 
295  vtkPolyDataMapper2D* GetSelectionMapper(int idx);
296  int GetNumberOfSelections();
297 
298 
299  //BTX
307 
310 
311  class Internals;
312  Internals* I;
313  //ETX
314 
318  double YMin;
319  double YMax;
320 
326 
327  // Indexed by screen position
328  double* Xs;
329  double* Mins;
330  double* Maxs;
331  double* MinOffsets;
332  double* MaxOffsets;
333 
334  //BTX
338  //ETX
339 
341 
342  double LineOpacity;
343  double FontSize;
344  double LineColor[3];
345  double AxisColor[3];
346  double AxisLabelColor[3];
347 
348  vtkGetStringMacro(InternalHoverText);
349  vtkSetStringMacro(InternalHoverText);
350  char* InternalHoverText;
351 
352 private:
354  void operator=(const vtkParallelCoordinatesRepresentation&); // Not implemented
355 };
356 
357 #endif
358 
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
create wireframe outline corners around bounding box
represents an object (geometry & properties) in a rendered scene
Definition: vtkActor.h:49
Store vtkAlgorithm input/output information.
abstract specification for Viewports
Definition: vtkViewport.h:45
a actor that draws 2D data
Definition: vtkActor2D.h:43
record modification and/or execution time
Definition: vtkTimeStamp.h:33
void PrintSelf(ostream &os, vtkIndent indent)
map scalar values into colors via a lookup table
Create an axis with tick marks and labels.
a vtkAbstractArray subclass for strings
A node in a selection tree. Used to store selection results.
Definition: vtkSelection.h:43
dynamic, self-adjusting array of vtkIdType
int vtkIdType
Definition: vtkType.h:255
virtual bool AddToView(vtkView *vtkNotUsed(view))
concrete dataset represents vertices, lines, polygons, and triangle strips
Definition: vtkPolyData.h:81
Pipeline data object that contains multiple vtkArray objects.
Definition: vtkArrayData.h:50
#define VTK_VIEWS_EXPORT
static vtkRenderedRepresentation * New()
2D text annotation
Definition: vtkTextMapper.h:43
Proxy object to connect input/output ports.
dynamic, self-adjusting array of double
a list of Props
window superclass for vtkRenderWindow
Definition: vtkWindow.h:35
Sets theme colors for a graphical view.
Definition: vtkViewTheme.h:46
dynamic, self-adjusting array of int
Definition: vtkIntArray.h:42
virtual int FillInputPortInformation(int port, vtkInformation *info)
The superclass for all views.
Definition: vtkView.h:61
a simple class to control print indentation
Definition: vtkIndent.h:37
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:34
abstract superclass for arrays of numeric data
Definition: vtkDataArray.h:53
perform coordinate transformation, and represent position, in a variety of vtk coordinate systems ...
Definition: vtkCoordinate.h:68
virtual int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *)
vtkSmartPointer< vtkBivariateLinearTableThreshold > LinearThreshold
A table, which contains similar-typed columns of data.
Definition: vtkTable.h:66
vtkSmartPointer< vtkPolyDataMapper2D > PlotMapper
create and manipulate unsorted lists of objects
Definition: vtkCollection.h:51
A view containing a renderer.
Definition: vtkRenderView.h:62
Store zero or more vtkInformation instances.
general representation of visualization data
Definition: vtkDataObject.h:70
draw vtkPolyData onto the image plane
performs line-based thresholding for vtkTable data.
represent and manipulate 3D points
Definition: vtkPoints.h:38
Data representation that takes generic multivariate data and produces a parallel coordinates plot...
extract a list of cells from a polydata
represent and manipulate fields of data
Definition: vtkFieldData.h:58