VTK  9.3.1
vtkParallelCoordinatesView.h
Go to the documentation of this file.
1 // SPDX-FileCopyrightText: Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
2 // SPDX-FileCopyrightText: Copyright 2009 Sandia Corporation
3 // SPDX-License-Identifier: LicenseRef-BSD-3-Clause-Sandia-USGov
29 #ifndef vtkParallelCoordinatesView_h
30 #define vtkParallelCoordinatesView_h
31 
32 #include "vtkRenderView.h"
33 #include "vtkViewsInfovisModule.h" // For export macro
34 
35 VTK_ABI_NAMESPACE_BEGIN
36 class vtkActor2D;
37 class vtkOutlineSource;
39 class vtkPolyData;
41 
42 class VTKVIEWSINFOVIS_EXPORT vtkParallelCoordinatesView : public vtkRenderView
43 {
44 public:
47  void PrintSelf(ostream& os, vtkIndent indent) override;
48 
49  enum
50  {
51  VTK_BRUSH_LASSO = 0,
55  VTK_BRUSH_MODECOUNT
56  };
57  enum
58  {
59  VTK_BRUSHOPERATOR_ADD = 0,
63  VTK_BRUSHOPERATOR_MODECOUNT
64  };
65  enum
66  {
67  VTK_INSPECT_MANIPULATE_AXES = 0,
69  VTK_INSPECT_MODECOUNT
70  };
71 
72  void SetBrushMode(int);
73  void SetBrushModeToLasso() { this->SetBrushMode(VTK_BRUSH_LASSO); }
74  void SetBrushModeToAngle() { this->SetBrushMode(VTK_BRUSH_ANGLE); }
75  void SetBrushModeToFunction() { this->SetBrushMode(VTK_BRUSH_FUNCTION); }
76  void SetBrushModeToAxisThreshold() { this->SetBrushMode(VTK_BRUSH_AXISTHRESHOLD); }
77  vtkGetMacro(BrushMode, int);
78 
79  void SetBrushOperator(int);
80  void SetBrushOperatorToAdd() { this->SetBrushOperator(VTK_BRUSHOPERATOR_ADD); }
81  void SetBrushOperatorToSubtract() { this->SetBrushOperator(VTK_BRUSHOPERATOR_SUBTRACT); }
82  void SetBrushOperatorToIntersect() { this->SetBrushOperator(VTK_BRUSHOPERATOR_INTERSECT); }
83  void SetBrushOperatorToReplace() { this->SetBrushOperator(VTK_BRUSHOPERATOR_REPLACE); }
84  vtkGetMacro(BrushOperator, int);
85 
86  void SetInspectMode(int);
87  void SetInspectModeToManipulateAxes() { this->SetInspectMode(VTK_INSPECT_MANIPULATE_AXES); }
88  void SetInpsectModeToSelectData() { this->SetInspectMode(VTK_INSPECT_SELECT_DATA); }
89  vtkGetMacro(InspectMode, int);
90 
91  void SetMaximumNumberOfBrushPoints(int);
92  vtkGetMacro(MaximumNumberOfBrushPoints, int);
93 
94  vtkSetMacro(CurrentBrushClass, int);
95  vtkGetMacro(CurrentBrushClass, int);
96 
97  void ApplyViewTheme(vtkViewTheme* theme) override;
98 
99 protected:
101  ~vtkParallelCoordinatesView() override;
102 
104 
105  enum
106  {
107  VTK_HIGHLIGHT_CENTER = 0,
109  VTK_HIGHLIGHT_MAX
110  };
114 
121 
125 
128 
131 
132  void ProcessEvents(vtkObject* caller, unsigned long event, void* callData) override;
134 
135  void PrepareForRendering() override;
136 
138 
141  void Hover(unsigned long event);
142  void ManipulateAxes(unsigned long event);
143  void SelectData(unsigned long event);
144  void Zoom(unsigned long event);
145  void Pan(unsigned long event);
147 
151  int SetAxisHighlightPosition(vtkParallelCoordinatesRepresentation* rep, int position);
152 
156  int SetAxisHighlightPosition(vtkParallelCoordinatesRepresentation* rep, double position);
157 
158  int AddLassoBrushPoint(double* p);
159  int SetBrushLine(int line, double* p1, double* p2);
160  void GetBrushLine(int line, vtkIdType& npts, vtkIdType const*& ptids);
161  int SetAngleBrushLine(double* p1, double* p2);
162  int SetFunctionBrushLine1(double* p1, double* p2);
163  int SetFunctionBrushLine2(double* p1, double* p2);
164  void ClearBrushPoints();
165 
166 private:
168  void operator=(const vtkParallelCoordinatesView&) = delete;
169 };
170 
171 VTK_ABI_NAMESPACE_END
172 #endif
vtkSmartPointer< vtkPolyData > BrushData
abstract base class for most VTK objects
Definition: vtkObject.h:51
a actor that draws 2D data
Definition: vtkActor2D.h:34
record modification and/or execution time
Definition: vtkTimeStamp.h:24
static vtkRenderView * New()
int vtkIdType
Definition: vtkType.h:315
concrete dataset represents vertices, lines, polygons, and triangle strips
Definition: vtkPolyData.h:79
void PrepareForRendering() override
Called by the view when the renderer is about to render.
view to be used with vtkParallelCoordinatesRepresentation
vtkSmartPointer< vtkPolyDataMapper2D > HighlightMapper
Proxy object to connect input/output ports.
Sets theme colors for a graphical view.
Definition: vtkViewTheme.h:33
void ApplyViewTheme(vtkViewTheme *theme) override
Applies a view theme to this view.
a simple class to control print indentation
Definition: vtkIndent.h:28
void ProcessEvents(vtkObject *caller, unsigned long eventId, void *callData) override
Called to process events.
The superclass for all representations.
create wireframe outline around bounding box
vtkSmartPointer< vtkActor2D > HighlightActor
A view containing a renderer.
Definition: vtkRenderView.h:49
vtkSmartPointer< vtkActor2D > BrushActor
vtkSmartPointer< vtkOutlineSource > HighlightSource
vtkSmartPointer< vtkPolyDataMapper2D > BrushMapper
draw vtkPolyData onto the image plane
Data representation that takes generic multivariate data and produces a parallel coordinates plot...
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
virtual vtkDataRepresentation * CreateDefaultRepresentation(vtkAlgorithmOutput *conn)
Create a default vtkDataRepresentation for the given vtkAlgorithmOutput.