VTK  9.2.6
vtkParallelCoordinatesView.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3 Program: Visualization Toolkit
4 Module: vtkParallelCoordinatesView.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 -------------------------------------------------------------------------*/
45 #ifndef vtkParallelCoordinatesView_h
46 #define vtkParallelCoordinatesView_h
47 
48 #include "vtkRenderView.h"
49 #include "vtkViewsInfovisModule.h" // For export macro
50 
51 class vtkActor2D;
52 class vtkOutlineSource;
54 class vtkPolyData;
56 
57 class VTKVIEWSINFOVIS_EXPORT vtkParallelCoordinatesView : public vtkRenderView
58 {
59 public:
62  void PrintSelf(ostream& os, vtkIndent indent) override;
63 
64  enum
65  {
66  VTK_BRUSH_LASSO = 0,
70  VTK_BRUSH_MODECOUNT
71  };
72  enum
73  {
74  VTK_BRUSHOPERATOR_ADD = 0,
78  VTK_BRUSHOPERATOR_MODECOUNT
79  };
80  enum
81  {
82  VTK_INSPECT_MANIPULATE_AXES = 0,
84  VTK_INSPECT_MODECOUNT
85  };
86 
87  void SetBrushMode(int);
88  void SetBrushModeToLasso() { this->SetBrushMode(VTK_BRUSH_LASSO); }
89  void SetBrushModeToAngle() { this->SetBrushMode(VTK_BRUSH_ANGLE); }
90  void SetBrushModeToFunction() { this->SetBrushMode(VTK_BRUSH_FUNCTION); }
91  void SetBrushModeToAxisThreshold() { this->SetBrushMode(VTK_BRUSH_AXISTHRESHOLD); }
92  vtkGetMacro(BrushMode, int);
93 
94  void SetBrushOperator(int);
95  void SetBrushOperatorToAdd() { this->SetBrushOperator(VTK_BRUSHOPERATOR_ADD); }
96  void SetBrushOperatorToSubtract() { this->SetBrushOperator(VTK_BRUSHOPERATOR_SUBTRACT); }
97  void SetBrushOperatorToIntersect() { this->SetBrushOperator(VTK_BRUSHOPERATOR_INTERSECT); }
98  void SetBrushOperatorToReplace() { this->SetBrushOperator(VTK_BRUSHOPERATOR_REPLACE); }
99  vtkGetMacro(BrushOperator, int);
100 
101  void SetInspectMode(int);
102  void SetInspectModeToManipulateAxes() { this->SetInspectMode(VTK_INSPECT_MANIPULATE_AXES); }
103  void SetInpsectModeToSelectData() { this->SetInspectMode(VTK_INSPECT_SELECT_DATA); }
104  vtkGetMacro(InspectMode, int);
105 
106  void SetMaximumNumberOfBrushPoints(int);
107  vtkGetMacro(MaximumNumberOfBrushPoints, int);
108 
109  vtkSetMacro(CurrentBrushClass, int);
110  vtkGetMacro(CurrentBrushClass, int);
111 
112  void ApplyViewTheme(vtkViewTheme* theme) override;
113 
114 protected:
116  ~vtkParallelCoordinatesView() override;
117 
119 
120  enum
121  {
122  VTK_HIGHLIGHT_CENTER = 0,
124  VTK_HIGHLIGHT_MAX
125  };
129 
136 
140 
143 
146 
147  void ProcessEvents(vtkObject* caller, unsigned long event, void* callData) override;
149 
150  void PrepareForRendering() override;
151 
153 
156  void Hover(unsigned long event);
157  void ManipulateAxes(unsigned long event);
158  void SelectData(unsigned long event);
159  void Zoom(unsigned long event);
160  void Pan(unsigned long event);
162 
166  int SetAxisHighlightPosition(vtkParallelCoordinatesRepresentation* rep, int position);
167 
171  int SetAxisHighlightPosition(vtkParallelCoordinatesRepresentation* rep, double position);
172 
173  int AddLassoBrushPoint(double* p);
174  int SetBrushLine(int line, double* p1, double* p2);
175  void GetBrushLine(int line, vtkIdType& npts, vtkIdType const*& ptids);
176  int SetAngleBrushLine(double* p1, double* p2);
177  int SetFunctionBrushLine1(double* p1, double* p2);
178  int SetFunctionBrushLine2(double* p1, double* p2);
179  void ClearBrushPoints();
180 
181 private:
183  void operator=(const vtkParallelCoordinatesView&) = delete;
184 };
185 
186 #endif
vtkSmartPointer< vtkPolyData > BrushData
abstract base class for most VTK objects
Definition: vtkObject.h:62
a actor that draws 2D data
Definition: vtkActor2D.h:45
record modification and/or execution time
Definition: vtkTimeStamp.h:35
static vtkRenderView * New()
int vtkIdType
Definition: vtkType.h:332
concrete dataset represents vertices, lines, polygons, and triangle strips
Definition: vtkPolyData.h:90
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:48
void ApplyViewTheme(vtkViewTheme *theme) override
Applies a view theme to this view.
a simple class to control print indentation
Definition: vtkIndent.h:39
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:64
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.