VTK  9.0.1
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 -------------------------------------------------------------------------*/
42 #ifndef vtkParallelCoordinatesView_h
43 #define vtkParallelCoordinatesView_h
44 
45 #include "vtkRenderView.h"
46 #include "vtkViewsInfovisModule.h" // For export macro
47 
48 class vtkActor2D;
49 class vtkOutlineSource;
51 class vtkPolyData;
53 
54 class VTKVIEWSINFOVIS_EXPORT vtkParallelCoordinatesView : public vtkRenderView
55 {
56 public:
59  void PrintSelf(ostream& os, vtkIndent indent) override;
60 
61  enum
62  {
63  VTK_BRUSH_LASSO = 0,
67  VTK_BRUSH_MODECOUNT
68  };
69  enum
70  {
71  VTK_BRUSHOPERATOR_ADD = 0,
75  VTK_BRUSHOPERATOR_MODECOUNT
76  };
77  enum
78  {
79  VTK_INSPECT_MANIPULATE_AXES = 0,
81  VTK_INSPECT_MODECOUNT
82  };
83 
84  void SetBrushMode(int);
85  void SetBrushModeToLasso() { this->SetBrushMode(VTK_BRUSH_LASSO); }
86  void SetBrushModeToAngle() { this->SetBrushMode(VTK_BRUSH_ANGLE); }
87  void SetBrushModeToFunction() { this->SetBrushMode(VTK_BRUSH_FUNCTION); }
88  void SetBrushModeToAxisThreshold() { this->SetBrushMode(VTK_BRUSH_AXISTHRESHOLD); }
89  vtkGetMacro(BrushMode, int);
90 
91  void SetBrushOperator(int);
92  void SetBrushOperatorToAdd() { this->SetBrushOperator(VTK_BRUSHOPERATOR_ADD); }
93  void SetBrushOperatorToSubtract() { this->SetBrushOperator(VTK_BRUSHOPERATOR_SUBTRACT); }
94  void SetBrushOperatorToIntersect() { this->SetBrushOperator(VTK_BRUSHOPERATOR_INTERSECT); }
95  void SetBrushOperatorToReplace() { this->SetBrushOperator(VTK_BRUSHOPERATOR_REPLACE); }
96  vtkGetMacro(BrushOperator, int);
97 
98  void SetInspectMode(int);
99  void SetInspectModeToManipulateAxes() { this->SetInspectMode(VTK_INSPECT_MANIPULATE_AXES); }
100  void SetInpsectModeToSelectData() { this->SetInspectMode(VTK_INSPECT_SELECT_DATA); }
101  vtkGetMacro(InspectMode, int);
102 
103  void SetMaximumNumberOfBrushPoints(int);
104  vtkGetMacro(MaximumNumberOfBrushPoints, int);
105 
106  vtkSetMacro(CurrentBrushClass, int);
107  vtkGetMacro(CurrentBrushClass, int);
108 
109  void ApplyViewTheme(vtkViewTheme* theme) override;
110 
111 protected:
113  ~vtkParallelCoordinatesView() override;
114 
116 
117  enum
118  {
119  VTK_HIGHLIGHT_CENTER = 0,
121  VTK_HIGHLIGHT_MAX
122  };
126 
133 
137 
140 
143 
144  void ProcessEvents(vtkObject* caller, unsigned long event, void* callData) override;
146 
147  void PrepareForRendering() override;
148 
150 
153  void Hover(unsigned long event);
154  void ManipulateAxes(unsigned long event);
155  void SelectData(unsigned long event);
156  void Zoom(unsigned long event);
157  void Pan(unsigned long event);
159 
163  int SetAxisHighlightPosition(vtkParallelCoordinatesRepresentation* rep, int position);
164 
168  int SetAxisHighlightPosition(vtkParallelCoordinatesRepresentation* rep, double position);
169 
170  int AddLassoBrushPoint(double* p);
171  int SetBrushLine(int line, double* p1, double* p2);
172  void GetBrushLine(int line, vtkIdType& npts, vtkIdType const*& ptids);
173  int SetAngleBrushLine(double* p1, double* p2);
174  int SetFunctionBrushLine1(double* p1, double* p2);
175  int SetFunctionBrushLine2(double* p1, double* p2);
176  void ClearBrushPoints();
177 
178 private:
180  void operator=(const vtkParallelCoordinatesView&) = delete;
181 };
182 
183 #endif
vtkSmartPointer< vtkPolyData > BrushData
abstract base class for most VTK objects
Definition: vtkObject.h:62
a actor that draws 2D data
Definition: vtkActor2D.h:39
record modification and/or execution time
Definition: vtkTimeStamp.h:32
static vtkRenderView * New()
int vtkIdType
Definition: vtkType.h:338
concrete dataset represents vertices, lines, polygons, and triangle strips
Definition: vtkPolyData.h:84
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:42
void ApplyViewTheme(vtkViewTheme *theme) override
Applies a view theme to this view.
a simple class to control print indentation
Definition: vtkIndent.h:33
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.