VTK  9.2.6
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-------------------------------------------------------------------------*/
50#ifndef vtkParallelCoordinatesRepresentation_h
51#define vtkParallelCoordinatesRepresentation_h
52
54#include "vtkViewsInfovisModule.h" // For export macro
55
56class vtkActor;
57class vtkActor2D;
58class vtkArrayData;
59class vtkAxisActor2D;
61class vtkCollection;
62class vtkCoordinate;
63class vtkFieldData;
64class vtkDataArray;
65class vtkDataObject;
66class vtkDoubleArray;
67class vtkIdList;
68class vtkIdTypeArray;
69class vtkIntArray;
70class vtkLookupTable;
72class vtkPoints;
73class vtkPolyData;
76class vtkSelection;
78class vtkTextMapper;
79class vtkTimeStamp;
81class vtkViewport;
82class vtkWindow;
83
85{
86public:
89 void PrintSelf(ostream& os, vtkIndent indent) override;
90
96 void ApplyViewTheme(vtkViewTheme* theme) override;
97
101 virtual std::string GetHoverString(vtkView* view, int x, int y);
102
104
107 int SetPositionAndSize(double* position, double* size);
108 int GetPositionAndSize(double* position, double* size);
110
112
118
122 void SetPlotTitle(const char*);
123
125
128 vtkGetMacro(NumberOfAxes, int);
130
132
135 vtkGetMacro(NumberOfSamples, int);
137
139
143 vtkGetMacro(NumberOfAxisLabels, int);
145
147
151 virtual int SwapAxisPositions(int position1, int position2);
152 int SetXCoordinateOfPosition(int position, double xcoord);
153 double GetXCoordinateOfPosition(int axis);
154 void GetXCoordinatesOfPositions(double* coords);
155 int GetPositionNearXCoordinate(double xcoord);
157
159
162 vtkSetMacro(UseCurves, vtkTypeBool);
163 vtkGetMacro(UseCurves, vtkTypeBool);
164 vtkBooleanMacro(UseCurves, vtkTypeBool);
166
168
171 vtkSetMacro(CurveResolution, int);
172 vtkGetMacro(CurveResolution, int);
174
176
179 vtkGetMacro(LineOpacity, double);
180 vtkGetMacro(FontSize, double);
181 vtkGetVector3Macro(LineColor, double);
182 vtkGetVector3Macro(AxisColor, double);
183 vtkGetVector3Macro(AxisLabelColor, double);
184 vtkSetMacro(LineOpacity, double);
185 vtkSetMacro(FontSize, double);
186 vtkSetVector3Macro(LineColor, double);
187 vtkSetVector3Macro(AxisColor, double);
188 vtkSetVector3Macro(AxisLabelColor, double);
190
192
195 vtkSetMacro(AngleBrushThreshold, double);
196 vtkGetMacro(AngleBrushThreshold, double);
198
200
203 vtkSetMacro(FunctionBrushThreshold, double);
204 vtkGetMacro(FunctionBrushThreshold, double);
206
208
211 int GetRangeAtPosition(int position, double range[2]);
212 virtual int SetRangeAtPosition(int position, double range[2]);
214
218 void ResetAxes();
219
221
225 virtual void LassoSelect(int brushClass, int brushOperator, vtkPoints* brushPoints);
226 virtual void AngleSelect(int brushClass, int brushOperator, double* p1, double* p2);
227 virtual void FunctionSelect(
228 int brushClass, int brushOperator, double* p1, double* p2, double* q1, double* q2);
229 virtual void RangeSelect(int brushClass, int brushOperator, double* p1, double* p2);
231
233 {
234 INPUT_DATA = 0,
236 NUM_INPUT_PORTS
237 };
238
239protected:
242
243 int FillInputPortInformation(int port, vtkInformation* info) override;
244
246
248
251 bool AddToView(vtkView* view) override;
252 bool RemoveFromView(vtkView* view) override;
253 void PrepareForRendering(vtkRenderView* view) override;
255
260 void UpdateHoverHighlight(vtkView* view, int x, int y);
261
265 virtual int AllocatePolyData(vtkPolyData* polyData, int numLines, int numPointsPerLine,
266 int numStrips, int numPointsPerStrip, int numQuads, int numPoints, int numCellScalars,
267 int numPointScalars);
268
273
275
280 virtual int PlaceLines(vtkPolyData* polyData, vtkTable* data, vtkIdTypeArray* idsToPlot);
281 virtual int PlaceCurves(vtkPolyData* polyData, vtkTable* data, vtkIdTypeArray* idsToPlot);
283
288 virtual int PlaceSelection(
289 vtkPolyData* polyData, vtkTable* data, vtkSelectionNode* selectionNode);
290
295
299 virtual int UpdatePlotProperties(vtkStringArray* inputTitles);
300
304 virtual int ReallocateInternals();
305
307
310 int ComputePointPosition(double* p);
311 int ComputeLinePosition(double* p1, double* p2);
313
315
318 virtual void SelectRows(vtkIdType brushClass, vtkIdType brushOperator, vtkIdTypeArray* rowIds);
319 vtkSelection* ConvertSelection(vtkView* view, vtkSelection* selection) override;
320 virtual void BuildInverseSelection();
322 vtkPolyData* input, vtkActor2D* actor, bool forceStandard = false);
324
329 void BuildDefaultSCurve(vtkDoubleArray* array, int numValues);
330
335 virtual void LassoSelectInternal(vtkPoints* brushPoints, vtkIdTypeArray* outIds);
336
340 virtual void UpdateSelectionActors();
341
344
352
355
356 class Internals;
357 Internals* I;
358
362 double YMin;
363 double YMax;
364
370
371 // Indexed by screen position
372 double* Xs;
373 double* Mins;
374 double* Maxs;
375 double* MinOffsets;
376 double* MaxOffsets;
377
381
383
385 double FontSize;
386 double LineColor[3];
387 double AxisColor[3];
388 double AxisLabelColor[3];
389
390 vtkGetStringMacro(InternalHoverText);
391 vtkSetStringMacro(InternalHoverText);
393
394private:
396 void operator=(const vtkParallelCoordinatesRepresentation&) = delete;
397};
398
399#endif
a actor that draws 2D data
Definition vtkActor2D.h:40
represents an object (geometry & properties) in a rendered scene
Definition vtkActor.h:46
Proxy object to connect input/output ports.
Pipeline data object that contains multiple vtkArray objects.
Create an axis with tick marks and labels.
performs line-based thresholding for vtkTable data.
create and manipulate ordered lists of objects
perform coordinate transformation, and represent position, in a variety of vtk coordinate systems
abstract superclass for arrays of numeric data
general representation of visualization data
dynamic, self-adjusting array of double
represent and manipulate fields of data
list of point or cell ids
Definition vtkIdList.h:31
dynamic, self-adjusting array of vtkIdType
a simple class to control print indentation
Definition vtkIndent.h:34
Store zero or more vtkInformation instances.
Store vtkAlgorithm input/output information.
dynamic, self-adjusting array of int
Definition vtkIntArray.h:40
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.
int SetPositionAndSize(double *position, double *size)
Change the position of the plot.
virtual int SwapAxisPositions(int position1, int position2)
Move an axis to a particular screen position.
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.
virtual void AngleSelect(int brushClass, int brushOperator, double *p1, double *p2)
Do a selection of the lines.
int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *) override
Subclasses should override this to connect inputs to the internal pipeline as necessary.
int GetPositionAndSize(double *position, double *size)
Change the position of the plot.
int GetPositionNearXCoordinate(double xcoord)
Move an axis to a particular screen position.
virtual void LassoSelect(int brushClass, int brushOperator, vtkPoints *brushPoints)
Do a selection of the lines.
vtkSmartPointer< vtkBivariateLinearTableThreshold > LinearThreshold
void SetAxisTitles(vtkStringArray *)
Set/Get the axis titles.
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)
void SetAxisTitles(vtkAlgorithmOutput *)
Set/Get the axis titles.
double GetXCoordinateOfPosition(int axis)
Move an axis to a particular screen position.
int GetRangeAtPosition(int position, double range[2])
Set/get the value range of the axis at a particular screen position.
void ResetAxes()
Reset the axes to their default positions and orders.
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.
virtual int SetRangeAtPosition(int position, double range[2])
Set/get the value range of the axis at a particular screen position.
void GetXCoordinatesOfPositions(double *coords)
Move an axis to a particular screen position.
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...
virtual void FunctionSelect(int brushClass, int brushOperator, double *p1, double *p2, double *q1, double *q2)
Do a selection of the lines.
void SetNumberOfAxisLabels(int num)
Set/Get the number of labels to display on each axis.
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 RangeSelect(int brushClass, int brushOperator, double *p1, double *p2)
Do a selection of the lines.
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.
void SetPlotTitle(const char *)
Set the title for the entire plot.
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.
int SetXCoordinateOfPosition(int position, double xcoord)
Move an axis to a particular screen position.
static vtkParallelCoordinatesRepresentation * New()
represent and manipulate 3D points
Definition vtkPoints.h:34
draw vtkPolyData onto the image plane
concrete dataset represents vertices, lines, polygons, and triangle strips
Definition vtkPolyData.h:85
an ordered list of Props
A view containing a renderer.
a node in a vtkSelection the defines the selection criteria.
data object that represents a "selection" in VTK.
Hold a reference to a vtkObjectBase instance.
a vtkAbstractArray subclass for strings
A table, which contains similar-typed columns of data.
Definition vtkTable.h:68
2D text annotation
record modification and/or execution time
dynamic, self-adjusting array of unsigned int
Sets theme colors for a graphical view.
The superclass for all views.
Definition vtkView.h:58
abstract specification for Viewports
Definition vtkViewport.h:50
window superclass for vtkRenderWindow
Definition vtkWindow.h:39
int vtkTypeBool
Definition vtkABI.h:69
int vtkIdType
Definition vtkType.h:332