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-------------------------------------------------------------------------*/
69#ifndef vtkParallelCoordinatesRepresentation_h
70#define vtkParallelCoordinatesRepresentation_h
71
73#include "vtkViewsInfovisModule.h" // For export macro
74
75class vtkActor;
76class vtkActor2D;
77class vtkArrayData;
78class vtkAxisActor2D;
80class vtkCollection;
81class vtkCoordinate;
83class vtkFieldData;
84class vtkDataArray;
85class vtkDataObject;
86class vtkDoubleArray;
87class vtkIdList;
88class vtkIdTypeArray;
89class vtkIntArray;
90class vtkLookupTable;
92class vtkPoints;
93class vtkPolyData;
96class vtkSelection;
98class vtkTextMapper;
99class vtkTimeStamp;
101class vtkViewport;
102class vtkWindow;
103
105{
106public:
109 void PrintSelf(ostream& os, vtkIndent indent) override;
110
116 void ApplyViewTheme(vtkViewTheme* theme) override;
117
121 virtual std::string GetHoverString(vtkView* view, int x, int y);
122 VTK_DEPRECATED_IN_9_1_0("Use std::string GetHoverString(vtkView* view, int x, int y)")
123 virtual const char* GetHoverText(vtkView* view, int x, int y);
124
126
129 int SetPositionAndSize(double* position, double* size);
130 int GetPositionAndSize(double* position, double* size);
132
134
137 void SetAxisTitles(vtkStringArray*);
138 void SetAxisTitles(vtkAlgorithmOutput*);
140
144 void SetPlotTitle(const char*);
145
147
150 vtkGetMacro(NumberOfAxes, int);
152
154
157 vtkGetMacro(NumberOfSamples, int);
159
161
164 void SetNumberOfAxisLabels(int num);
165 vtkGetMacro(NumberOfAxisLabels, int);
167
169
173 virtual int SwapAxisPositions(int position1, int position2);
174 int SetXCoordinateOfPosition(int position, double xcoord);
175 double GetXCoordinateOfPosition(int axis);
176 void GetXCoordinatesOfPositions(double* coords);
177 int GetPositionNearXCoordinate(double xcoord);
179
181
184 vtkSetMacro(UseCurves, vtkTypeBool);
185 vtkGetMacro(UseCurves, vtkTypeBool);
186 vtkBooleanMacro(UseCurves, vtkTypeBool);
188
190
193 vtkSetMacro(CurveResolution, int);
194 vtkGetMacro(CurveResolution, int);
196
198
201 vtkGetMacro(LineOpacity, double);
202 vtkGetMacro(FontSize, double);
203 vtkGetVector3Macro(LineColor, double);
204 vtkGetVector3Macro(AxisColor, double);
205 vtkGetVector3Macro(AxisLabelColor, double);
206 vtkSetMacro(LineOpacity, double);
207 vtkSetMacro(FontSize, double);
208 vtkSetVector3Macro(LineColor, double);
209 vtkSetVector3Macro(AxisColor, double);
210 vtkSetVector3Macro(AxisLabelColor, double);
212
214
217 vtkSetMacro(AngleBrushThreshold, double);
218 vtkGetMacro(AngleBrushThreshold, double);
220
222
225 vtkSetMacro(FunctionBrushThreshold, double);
226 vtkGetMacro(FunctionBrushThreshold, double);
228
230
233 int GetRangeAtPosition(int position, double range[2]);
234 virtual int SetRangeAtPosition(int position, double range[2]);
236
240 void ResetAxes();
241
243
247 virtual void LassoSelect(int brushClass, int brushOperator, vtkPoints* brushPoints);
248 virtual void AngleSelect(int brushClass, int brushOperator, double* p1, double* p2);
249 virtual void FunctionSelect(
250 int brushClass, int brushOperator, double* p1, double* p2, double* q1, double* q2);
251 virtual void RangeSelect(int brushClass, int brushOperator, double* p1, double* p2);
253
255 {
256 INPUT_DATA = 0,
258 NUM_INPUT_PORTS
259 };
260
261protected:
264
266
268
270
273 bool AddToView(vtkView* view) override;
274 bool RemoveFromView(vtkView* view) override;
275 void PrepareForRendering(vtkRenderView* view) override;
277
282 void UpdateHoverHighlight(vtkView* view, int x, int y);
283
287 virtual int AllocatePolyData(vtkPolyData* polyData, int numLines, int numPointsPerLine,
288 int numStrips, int numPointsPerStrip, int numQuads, int numPoints, int numCellScalars,
289 int numPointScalars);
290
295
297
302 virtual int PlaceLines(vtkPolyData* polyData, vtkTable* data, vtkIdTypeArray* idsToPlot);
303 virtual int PlaceCurves(vtkPolyData* polyData, vtkTable* data, vtkIdTypeArray* idsToPlot);
305
310 virtual int PlaceSelection(
311 vtkPolyData* polyData, vtkTable* data, vtkSelectionNode* selectionNode);
312
317
321 virtual int UpdatePlotProperties(vtkStringArray* inputTitles);
322
326 virtual int ReallocateInternals();
327
329
332 int ComputePointPosition(double* p);
333 int ComputeLinePosition(double* p1, double* p2);
335
337
340 virtual void SelectRows(vtkIdType brushClass, vtkIdType brushOperator, vtkIdTypeArray* rowIds);
341 vtkSelection* ConvertSelection(vtkView* view, vtkSelection* selection) override;
342 virtual void BuildInverseSelection();
344 vtkPolyData* input, vtkActor2D* actor, bool forceStandard = false);
346
351 void BuildDefaultSCurve(vtkDoubleArray* array, int numValues);
352
357 virtual void LassoSelectInternal(vtkPoints* brushPoints, vtkIdTypeArray* outIds);
358
362 virtual void UpdateSelectionActors();
363
366
374
377
378 class Internals;
379 Internals* I;
380
384 double YMin;
385 double YMax;
386
392
393 // Indexed by screen position
394 double* Xs;
395 double* Mins;
396 double* Maxs;
397 double* MinOffsets;
398 double* MaxOffsets;
399
403
405
407 double FontSize;
408 double LineColor[3];
409 double AxisColor[3];
410 double AxisLabelColor[3];
411
412 vtkGetStringMacro(InternalHoverText);
413 vtkSetStringMacro(InternalHoverText);
415
416private:
418 void operator=(const vtkParallelCoordinatesRepresentation&) = delete;
419};
420
421#endif
a actor that draws 2D data
Definition: vtkActor2D.h:149
represents an object (geometry & properties) in a rendered scene
Definition: vtkActor.h:155
Proxy object to connect input/output ports.
Pipeline data object that contains multiple vtkArray objects.
Definition: vtkArrayData.h:88
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
abstract superclass for arrays of numeric data
Definition: vtkDataArray.h:159
general representation of visualization data
dynamic, self-adjusting array of double
extract a list of cells from a polydata
represent and manipulate fields of data
Definition: vtkFieldData.h:164
list of point or cell ids
Definition: vtkIdList.h:140
dynamic, self-adjusting array of vtkIdType
a simple class to control print indentation
Definition: vtkIndent.h:113
Store zero or more vtkInformation instances.
Store vtkAlgorithm input/output information.
dynamic, self-adjusting array of int
Definition: vtkIntArray.h:149
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:143
draw vtkPolyData onto the image plane
concrete dataset represents vertices, lines, polygons, and triangle strips
Definition: vtkPolyData.h:195
an ordered list of Props
A view containing a renderer.
Definition: vtkRenderView.h:78
a node in a vtkSelection the defines the selection criteria.
data object that represents a "selection" in VTK.
Definition: vtkSelection.h:163
a vtkAbstractArray subclass for strings
A table, which contains similar-typed columns of data.
Definition: vtkTable.h:172
2D text annotation
record modification and/or execution time
Definition: vtkTimeStamp.h:52
dynamic, self-adjusting array of unsigned int
Sets theme colors for a graphical view.
Definition: vtkViewTheme.h:132
The superclass for all views.
Definition: vtkView.h:55
abstract specification for Viewports
Definition: vtkViewport.h:47
window superclass for vtkRenderWindow
Definition: vtkWindow.h:36
@ 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