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 -------------------------------------------------------------------------*/
52 #ifndef vtkParallelCoordinatesRepresentation_h
53 #define vtkParallelCoordinatesRepresentation_h
54 
55 #include "vtkViewsInfovisModule.h" // For export macro
57 
58 class vtkActor;
59 class vtkActor2D;
60 class vtkArrayData;
61 class vtkAxisActor2D;
63 class vtkCollection;
64 class vtkCoordinate;
66 class vtkFieldData;
67 class vtkDataArray;
68 class vtkDataObject;
69 class vtkDoubleArray;
70 class vtkIdList;
71 class vtkIdTypeArray;
72 class vtkIntArray;
73 class vtkLookupTable;
75 class vtkPoints;
76 class vtkPolyData;
78 class vtkPropCollection;
79 class vtkSelection;
80 class vtkSelectionNode;
81 class vtkTextMapper;
82 class vtkTimeStamp;
84 class vtkViewport;
85 class vtkWindow;
86 
88 {
89 public:
92  void PrintSelf(ostream& os, vtkIndent indent);
93 
97  virtual void ApplyViewTheme(vtkViewTheme* theme);
98 
100  virtual const char* GetHoverText(vtkView* view, int x, int y);
101 
103 
104  int SetPositionAndSize(double* position, double* size);
105  int GetPositionAndSize(double* position, double* size);
107 
109 
110  void SetAxisTitles(vtkStringArray*);
111  void SetAxisTitles(vtkAlgorithmOutput*);
113 
115  void SetPlotTitle(const char*);
116 
118 
119  vtkGetMacro(NumberOfAxes,int);
121 
123 
124  vtkGetMacro(NumberOfSamples,int);
126 
128 
129  void SetNumberOfAxisLabels(int num);
130  vtkGetMacro(NumberOfAxisLabels,int);
132 
134 
136  virtual int SwapAxisPositions(int position1, int position2);
137  int SetXCoordinateOfPosition(int position, double xcoord);
138  double GetXCoordinateOfPosition(int axis);
139  void GetXCoordinatesOfPositions(double* coords);
140  int GetPositionNearXCoordinate(double xcoord);
142 
144 
145  vtkSetMacro(UseCurves,int);
146  vtkGetMacro(UseCurves,int);
147  vtkBooleanMacro(UseCurves,int);
149 
151 
152  vtkSetMacro(CurveResolution,int);
153  vtkGetMacro(CurveResolution,int);
155 
157 
158  vtkGetMacro(LineOpacity,double)
159  vtkGetMacro(FontSize,double);
160  vtkGetVector3Macro(LineColor,double);
161  vtkGetVector3Macro(AxisColor,double);
162  vtkGetVector3Macro(AxisLabelColor,double);
163  vtkSetMacro(LineOpacity,double);
164  vtkSetMacro(FontSize,double);
165  vtkSetVector3Macro(LineColor,double);
166  vtkSetVector3Macro(AxisColor,double);
167  vtkSetVector3Macro(AxisLabelColor,double);
169 
171 
173  vtkSetMacro(AngleBrushThreshold,double);
174  vtkGetMacro(AngleBrushThreshold,double);
176 
178 
180  vtkSetMacro(FunctionBrushThreshold,double);
181  vtkGetMacro(FunctionBrushThreshold,double);
183 
185 
186  int GetRangeAtPosition(int position, double range[2]);
187  virtual int SetRangeAtPosition(int position, double range[2]);
189 
191  void ResetAxes();
192 
194 
196  virtual void LassoSelect(int brushClass, int brushOperator, vtkPoints* brushPoints);
197  virtual void AngleSelect(int brushClass, int brushOperator, double *p1, double *p2);
198  virtual void FunctionSelect(int brushClass, int brushOperator, double *p1, double *p2, double *q1, double *q2);
199  virtual void RangeSelect(int brushClass, int brushOperator, double *p1, double *p2);
201 
202 //BTX
204  {
205  INPUT_DATA=0,
207  NUM_INPUT_PORTS
208  };
209 //ETX
210 
211 protected:
214 
216 
217  virtual int RequestData(
221 
223 
224  virtual bool AddToView(vtkView* view);
225  virtual bool RemoveFromView(vtkView* view);
226  virtual void PrepareForRendering(vtkRenderView* view);
228 
231  void UpdateHoverHighlight(vtkView* view, int x, int y);
232 
234 
235  virtual int AllocatePolyData(vtkPolyData* polyData,
236  int numLines,
237  int numPointsPerLine,
238  int numStrips,
239  int numPointsPerStrip,
240  int numQuads,
241  int numPoints,
242  int numCellScalars,
243  int numPointScalars);
245 
247  int PlaceAxes();
248 
250 
253  virtual int PlaceLines(vtkPolyData* polyData, vtkTable* data, vtkIdTypeArray* idsToPlot);
254  virtual int PlaceCurves(vtkPolyData* polyData, vtkTable* data, vtkIdTypeArray* idsToPlot);
256 
260  virtual int PlaceSelection(vtkPolyData* polyData, vtkTable* data, vtkSelectionNode* selectionNode);
261 
263  virtual int ComputeDataProperties();
264 
266  virtual int UpdatePlotProperties(vtkStringArray* inputTitles);
267 
269  virtual int ReallocateInternals();
270 
272 
274  int ComputePointPosition(double* p);
275  int ComputeLinePosition(double* p1, double* p2);
277 
279 
281  virtual void SelectRows(vtkIdType brushClass, vtkIdType brushOperator, vtkIdTypeArray* rowIds);
282  virtual vtkSelection* ConvertSelection(vtkView* view, vtkSelection* selection);
283  virtual void BuildInverseSelection();
284  virtual vtkPolyDataMapper2D* InitializePlotMapper(vtkPolyData* input, vtkActor2D* actor, bool forceStandard=false);
286 
290  void BuildDefaultSCurve(vtkDoubleArray* array, int numValues);
291 
294  virtual void LassoSelectInternal(vtkPoints* brushPoints, vtkIdTypeArray* outIds);
295 
297  virtual void UpdateSelectionActors();
298 
299  vtkPolyDataMapper2D* GetSelectionMapper(int idx);
300  int GetNumberOfSelections();
301 
302 
303  //BTX
311 
314 
315  class Internals;
316  Internals* I;
317  //ETX
318 
322  double YMin;
323  double YMax;
324 
330 
331  // Indexed by screen position
332  double* Xs;
333  double* Mins;
334  double* Maxs;
335  double* MinOffsets;
336  double* MaxOffsets;
337 
338  //BTX
342  //ETX
343 
345 
346  double LineOpacity;
347  double FontSize;
348  double LineColor[3];
349  double AxisColor[3];
350  double AxisLabelColor[3];
351 
352  vtkGetStringMacro(InternalHoverText);
353  vtkSetStringMacro(InternalHoverText);
354  char* InternalHoverText;
355 
356 private:
358  void operator=(const vtkParallelCoordinatesRepresentation&); // Not implemented
359 };
360 
361 #endif
362 
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:50
Store vtkAlgorithm input/output information.
abstract specification for Viewports
Definition: vtkViewport.h:46
a actor that draws 2D data
Definition: vtkActor2D.h:44
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
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:44
dynamic, self-adjusting array of vtkIdType
int vtkIdType
Definition: vtkType.h:275
virtual bool AddToView(vtkView *vtkNotUsed(view))
concrete dataset represents vertices, lines, polygons, and triangle strips
Definition: vtkPolyData.h:83
Pipeline data object that contains multiple vtkArray objects.
Definition: vtkArrayData.h:51
static vtkRenderedRepresentation * New()
2D text annotation
Definition: vtkTextMapper.h:52
Proxy object to connect input/output ports.
dynamic, self-adjusting array of double
a list of Props
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:49
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:54
perform coordinate transformation, and represent position, in a variety of vtk coordinate systems ...
Definition: vtkCoordinate.h:69
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.
general representation of visualization data
Definition: vtkDataObject.h:64
draw vtkPolyData onto the image plane
performs line-based thresholding for vtkTable data.
#define VTKVIEWSINFOVIS_EXPORT
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:55