VTK  9.1.0
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-------------------------------------------------------------------------*/
59#ifndef vtkParallelCoordinatesRepresentation_h
60#define vtkParallelCoordinatesRepresentation_h
61
63#include "vtkViewsInfovisModule.h" // For export macro
64
65class vtkActor;
66class vtkActor2D;
67class vtkArrayData;
68class vtkAxisActor2D;
70class vtkCollection;
71class vtkCoordinate;
73class vtkFieldData;
74class vtkDataArray;
75class vtkDataObject;
76class vtkDoubleArray;
77class vtkIdList;
78class vtkIdTypeArray;
79class vtkIntArray;
80class vtkLookupTable;
82class vtkPoints;
83class vtkPolyData;
86class vtkSelection;
88class vtkTextMapper;
89class vtkTimeStamp;
91class vtkViewport;
92class vtkWindow;
93
95{
96public:
99 void PrintSelf(ostream& os, vtkIndent indent) override;
100
106 void ApplyViewTheme(vtkViewTheme* theme) override;
107
111 virtual std::string GetHoverString(vtkView* view, int x, int y);
112 VTK_DEPRECATED_IN_9_1_0("Use std::string GetHoverString(vtkView* view, int x, int y)")
113 virtual const char* GetHoverText(vtkView* view, int x, int y);
114
116
119 int SetPositionAndSize(double* position, double* size);
120 int GetPositionAndSize(double* position, double* size);
122
124
127 void SetAxisTitles(vtkStringArray*);
128 void SetAxisTitles(vtkAlgorithmOutput*);
130
134 void SetPlotTitle(const char*);
135
137
140 vtkGetMacro(NumberOfAxes, int);
142
144
147 vtkGetMacro(NumberOfSamples, int);
149
151
154 void SetNumberOfAxisLabels(int num);
155 vtkGetMacro(NumberOfAxisLabels, int);
157
159
163 virtual int SwapAxisPositions(int position1, int position2);
164 int SetXCoordinateOfPosition(int position, double xcoord);
165 double GetXCoordinateOfPosition(int axis);
166 void GetXCoordinatesOfPositions(double* coords);
167 int GetPositionNearXCoordinate(double xcoord);
169
171
174 vtkSetMacro(UseCurves, vtkTypeBool);
175 vtkGetMacro(UseCurves, vtkTypeBool);
176 vtkBooleanMacro(UseCurves, vtkTypeBool);
178
180
183 vtkSetMacro(CurveResolution, int);
184 vtkGetMacro(CurveResolution, int);
186
188
191 vtkGetMacro(LineOpacity, double);
192 vtkGetMacro(FontSize, double);
193 vtkGetVector3Macro(LineColor, double);
194 vtkGetVector3Macro(AxisColor, double);
195 vtkGetVector3Macro(AxisLabelColor, double);
196 vtkSetMacro(LineOpacity, double);
197 vtkSetMacro(FontSize, double);
198 vtkSetVector3Macro(LineColor, double);
199 vtkSetVector3Macro(AxisColor, double);
200 vtkSetVector3Macro(AxisLabelColor, double);
202
204
207 vtkSetMacro(AngleBrushThreshold, double);
208 vtkGetMacro(AngleBrushThreshold, double);
210
212
215 vtkSetMacro(FunctionBrushThreshold, double);
216 vtkGetMacro(FunctionBrushThreshold, double);
218
220
223 int GetRangeAtPosition(int position, double range[2]);
224 virtual int SetRangeAtPosition(int position, double range[2]);
226
230 void ResetAxes();
231
233
237 virtual void LassoSelect(int brushClass, int brushOperator, vtkPoints* brushPoints);
238 virtual void AngleSelect(int brushClass, int brushOperator, double* p1, double* p2);
239 virtual void FunctionSelect(
240 int brushClass, int brushOperator, double* p1, double* p2, double* q1, double* q2);
241 virtual void RangeSelect(int brushClass, int brushOperator, double* p1, double* p2);
243
245 {
246 INPUT_DATA = 0,
248 NUM_INPUT_PORTS
249 };
250
251protected:
254
256
258
260
263 bool AddToView(vtkView* view) override;
264 bool RemoveFromView(vtkView* view) override;
265 void PrepareForRendering(vtkRenderView* view) override;
267
272 void UpdateHoverHighlight(vtkView* view, int x, int y);
273
277 virtual int AllocatePolyData(vtkPolyData* polyData, int numLines, int numPointsPerLine,
278 int numStrips, int numPointsPerStrip, int numQuads, int numPoints, int numCellScalars,
279 int numPointScalars);
280
285
287
292 virtual int PlaceLines(vtkPolyData* polyData, vtkTable* data, vtkIdTypeArray* idsToPlot);
293 virtual int PlaceCurves(vtkPolyData* polyData, vtkTable* data, vtkIdTypeArray* idsToPlot);
295
300 virtual int PlaceSelection(
301 vtkPolyData* polyData, vtkTable* data, vtkSelectionNode* selectionNode);
302
307
311 virtual int UpdatePlotProperties(vtkStringArray* inputTitles);
312
316 virtual int ReallocateInternals();
317
319
322 int ComputePointPosition(double* p);
323 int ComputeLinePosition(double* p1, double* p2);
325
327
330 virtual void SelectRows(vtkIdType brushClass, vtkIdType brushOperator, vtkIdTypeArray* rowIds);
331 vtkSelection* ConvertSelection(vtkView* view, vtkSelection* selection) override;
332 virtual void BuildInverseSelection();
334 vtkPolyData* input, vtkActor2D* actor, bool forceStandard = false);
336
341 void BuildDefaultSCurve(vtkDoubleArray* array, int numValues);
342
347 virtual void LassoSelectInternal(vtkPoints* brushPoints, vtkIdTypeArray* outIds);
348
352 virtual void UpdateSelectionActors();
353
356
364
367
368 class Internals;
369 Internals* I;
370
374 double YMin;
375 double YMax;
376
382
383 // Indexed by screen position
384 double* Xs;
385 double* Mins;
386 double* Maxs;
387 double* MinOffsets;
388 double* MaxOffsets;
389
393
395
397 double FontSize;
398 double LineColor[3];
399 double AxisColor[3];
400 double AxisLabelColor[3];
401
402 vtkGetStringMacro(InternalHoverText);
403 vtkSetStringMacro(InternalHoverText);
405
406private:
408 void operator=(const vtkParallelCoordinatesRepresentation&) = delete;
409};
410
411#endif
a actor that draws 2D data
Definition: vtkActor2D.h:49
represents an object (geometry & properties) in a rendered scene
Definition: vtkActor.h:55
Proxy object to connect input/output ports.
Pipeline data object that contains multiple vtkArray objects.
Definition: vtkArrayData.h:58
Create an axis with tick marks and labels.
performs line-based thresholding for vtkTable data.
create and manipulate ordered lists of objects
Definition: vtkCollection.h:53
perform coordinate transformation, and represent position, in a variety of vtk coordinate systems
Definition: vtkCoordinate.h:86
abstract superclass for arrays of numeric data
Definition: vtkDataArray.h:59
general representation of visualization data
Definition: vtkDataObject.h:69
dynamic, self-adjusting array of double
extract a list of cells from a polydata
represent and manipulate fields of data
Definition: vtkFieldData.h:64
list of point or cell ids
Definition: vtkIdList.h:40
dynamic, self-adjusting array of vtkIdType
a simple class to control print indentation
Definition: vtkIndent.h:43
Store zero or more vtkInformation instances.
Store vtkAlgorithm input/output information.
dynamic, self-adjusting array of int
Definition: vtkIntArray.h:49
map scalar values into colors via a lookup table
create wireframe outline corners around bounding box
Data representation that takes generic multivariate data and produces a parallel coordinates plot.
virtual int AllocatePolyData(vtkPolyData *polyData, int numLines, int numPointsPerLine, int numStrips, int numPointsPerStrip, int numQuads, int numPoints, int numCellScalars, int numPointScalars)
Allocate the cells/points/scalars for a vtkPolyData.
int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *) override
Subclasses should override this to connect inputs to the internal pipeline as necessary.
vtkSmartPointer< vtkBivariateLinearTableThreshold > LinearThreshold
virtual void SelectRows(vtkIdType brushClass, vtkIdType brushOperator, vtkIdTypeArray *rowIds)
Select a set of points using the prescribed operator (add, subtract, etc.) and class.
vtkPolyDataMapper2D * GetSelectionMapper(int idx)
virtual void BuildInverseSelection()
Select a set of points using the prescribed operator (add, subtract, etc.) and class.
virtual int UpdatePlotProperties(vtkStringArray *inputTitles)
Set plot actor properties (line thickness, opacity, etc)
virtual int ReallocateInternals()
Delete and reallocate the internals, resetting to default values.
int ComputePointPosition(double *p)
Compute which screen position a point belongs to (returns the left position)
void UpdateHoverHighlight(vtkView *view, int x, int y)
This function is not actually used, but as left as a stub in case it becomes useful at some point.
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
vtkSmartPointer< vtkPolyDataMapper2D > PlotMapper
int PlaceAxes()
Put the axis actors in their correct positions.
virtual int PlaceSelection(vtkPolyData *polyData, vtkTable *data, vtkSelectionNode *selectionNode)
Takes the selection list (assumed to be a vtkIdTypeArray) from a vtkSelectionNode and plots lines/cur...
bool AddToView(vtkView *view) override
Add/remove the props and actors to/from a view.
virtual void LassoSelectInternal(vtkPoints *brushPoints, vtkIdTypeArray *outIds)
same as public version, but assumes that the brushpoints coming in are all within two neighboring axe...
int ComputeLinePosition(double *p1, double *p2)
Compute which screen position a point belongs to (returns the left position)
vtkSelection * ConvertSelection(vtkView *view, vtkSelection *selection) override
Select a set of points using the prescribed operator (add, subtract, etc.) and class.
void ApplyViewTheme(vtkViewTheme *theme) override
Apply the theme to this view.
virtual void UpdateSelectionActors()
todo
void PrepareForRendering(vtkRenderView *view) override
Add/remove the props and actors to/from a view.
virtual vtkPolyDataMapper2D * InitializePlotMapper(vtkPolyData *input, vtkActor2D *actor, bool forceStandard=false)
Select a set of points using the prescribed operator (add, subtract, etc.) and class.
bool RemoveFromView(vtkView *view) override
Add/remove the props and actors to/from a view.
int FillInputPortInformation(int port, vtkInformation *info) override
Fill the input port information objects for this algorithm.
virtual int PlaceLines(vtkPolyData *polyData, vtkTable *data, vtkIdTypeArray *idsToPlot)
Place line primitives into a vtkPolyData from the input data.
virtual std::string GetHoverString(vtkView *view, int x, int y)
Returns the hover text at an x,y location.
virtual int PlaceCurves(vtkPolyData *polyData, vtkTable *data, vtkIdTypeArray *idsToPlot)
Place line primitives into a vtkPolyData from the input data.
virtual int ComputeDataProperties()
Compute the number of axes and their individual ranges.
void BuildDefaultSCurve(vtkDoubleArray *array, int numValues)
Build an s-curve passing through (0,0) and (1,1) with a specified number of values.
static vtkParallelCoordinatesRepresentation * New()
represent and manipulate 3D points
Definition: vtkPoints.h:43
draw vtkPolyData onto the image plane
concrete dataset represents vertices, lines, polygons, and triangle strips
Definition: vtkPolyData.h:95
an ordered list of Props
A view containing a renderer.
Definition: vtkRenderView.h:68
a node in a vtkSelection the defines the selection criteria.
data object that represents a "selection" in VTK.
Definition: vtkSelection.h:63
a vtkAbstractArray subclass for strings
A table, which contains similar-typed columns of data.
Definition: vtkTable.h:72
2D text annotation
Definition: vtkTextMapper.h:57
record modification and/or execution time
Definition: vtkTimeStamp.h:42
dynamic, self-adjusting array of unsigned int
Sets theme colors for a graphical view.
Definition: vtkViewTheme.h:52
The superclass for all views.
Definition: vtkView.h:55
abstract specification for Viewports
Definition: vtkViewport.h:56
window superclass for vtkRenderWindow
Definition: vtkWindow.h:45
@ info
Definition: vtkX3D.h:382
@ port
Definition: vtkX3D.h:453
@ range
Definition: vtkX3D.h:244
@ position
Definition: vtkX3D.h:267
@ size
Definition: vtkX3D.h:259
@ data
Definition: vtkX3D.h:321
@ string
Definition: vtkX3D.h:496
int vtkTypeBool
Definition: vtkABI.h:69
#define VTK_DEPRECATED_IN_9_1_0(reason)
int vtkIdType
Definition: vtkType.h:332