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 
104  vtkGetMacro(MaximumNumberOfBrushPoints, int);
105 
106  vtkSetMacro(CurrentBrushClass, int);
107  vtkGetMacro(CurrentBrushClass, int);
108 
109  void ApplyViewTheme(vtkViewTheme* theme) override;
110 
111 protected:
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 
164 
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);
177 
178 private:
180  void operator=(const vtkParallelCoordinatesView&) = delete;
181 };
182 
183 #endif
vtkParallelCoordinatesRepresentation
Data representation that takes generic multivariate data and produces a parallel coordinates plot.
Definition: vtkParallelCoordinatesRepresentation.h:86
vtkPolyDataMapper2D
draw vtkPolyData onto the image plane
Definition: vtkPolyDataMapper2D.h:45
vtkParallelCoordinatesView::HighlightMapper
vtkSmartPointer< vtkPolyDataMapper2D > HighlightMapper
Definition: vtkParallelCoordinatesView.h:124
vtkRenderView
A view containing a renderer.
Definition: vtkRenderView.h:59
vtkParallelCoordinatesView::ApplyViewTheme
void ApplyViewTheme(vtkViewTheme *theme) override
vtkOutlineSource
create wireframe outline around bounding box
Definition: vtkOutlineSource.h:37
vtkParallelCoordinatesView::VTK_BRUSHOPERATOR_REPLACE
@ VTK_BRUSHOPERATOR_REPLACE
Definition: vtkParallelCoordinatesView.h:74
vtkParallelCoordinatesView::SetBrushOperatorToReplace
void SetBrushOperatorToReplace()
Definition: vtkParallelCoordinatesView.h:95
vtkIdType
int vtkIdType
Definition: vtkType.h:338
vtkParallelCoordinatesView::SetBrushModeToAngle
void SetBrushModeToAngle()
Definition: vtkParallelCoordinatesView.h:86
vtkParallelCoordinatesView::CreateDefaultRepresentation
vtkDataRepresentation * CreateDefaultRepresentation(vtkAlgorithmOutput *conn) override
Create a default vtkDataRepresentation for the given vtkAlgorithmOutput.
vtkParallelCoordinatesView::SetBrushOperatorToIntersect
void SetBrushOperatorToIntersect()
Definition: vtkParallelCoordinatesView.h:94
vtkParallelCoordinatesView::VTK_BRUSHOPERATOR_INTERSECT
@ VTK_BRUSHOPERATOR_INTERSECT
Definition: vtkParallelCoordinatesView.h:73
vtkTimeStamp
record modification and/or execution time
Definition: vtkTimeStamp.h:33
vtkParallelCoordinatesView::~vtkParallelCoordinatesView
~vtkParallelCoordinatesView() override
vtkParallelCoordinatesView::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
vtkObject
abstract base class for most VTK objects
Definition: vtkObject.h:54
vtkSmartPointer< vtkOutlineSource >
vtkParallelCoordinatesView::SetBrushMode
void SetBrushMode(int)
vtkParallelCoordinatesView::SetBrushOperatorToSubtract
void SetBrushOperatorToSubtract()
Definition: vtkParallelCoordinatesView.h:93
vtkParallelCoordinatesView::SetBrushLine
int SetBrushLine(int line, double *p1, double *p2)
vtkParallelCoordinatesView::SelectedAxisPosition
int SelectedAxisPosition
Definition: vtkParallelCoordinatesView.h:115
vtkParallelCoordinatesView::CurrentBrushClass
int CurrentBrushClass
Definition: vtkParallelCoordinatesView.h:132
vtkParallelCoordinatesView::SetFunctionBrushLine1
int SetFunctionBrushLine1(double *p1, double *p2)
vtkParallelCoordinatesView::Zoom
void Zoom(unsigned long event)
vtkRenderView.h
vtkParallelCoordinatesView::Hover
void Hover(unsigned long event)
Handle axis manipulation.
vtkParallelCoordinatesView::SetBrushOperatorToAdd
void SetBrushOperatorToAdd()
Definition: vtkParallelCoordinatesView.h:92
vtkParallelCoordinatesView::ClearBrushPoints
void ClearBrushPoints()
vtkParallelCoordinatesView::Pan
void Pan(unsigned long event)
vtkParallelCoordinatesView::PrepareForRendering
void PrepareForRendering() override
Called by the view when the renderer is about to render.
vtkParallelCoordinatesView::SetAngleBrushLine
int SetAngleBrushLine(double *p1, double *p2)
vtkParallelCoordinatesView::BrushMode
int BrushMode
Definition: vtkParallelCoordinatesView.h:128
vtkParallelCoordinatesView::SetMaximumNumberOfBrushPoints
void SetMaximumNumberOfBrushPoints(int)
vtkViewTheme
Sets theme colors for a graphical view.
Definition: vtkViewTheme.h:43
vtkParallelCoordinatesView::SetFunctionBrushLine2
int SetFunctionBrushLine2(double *p1, double *p2)
vtkX3D::position
@ position
Definition: vtkX3D.h:267
vtkParallelCoordinatesView::AddLassoBrushPoint
int AddLassoBrushPoint(double *p)
vtkParallelCoordinatesView::HighlightActor
vtkSmartPointer< vtkActor2D > HighlightActor
Definition: vtkParallelCoordinatesView.h:125
vtkDataRepresentation
The superclass for all representations.
Definition: vtkDataRepresentation.h:67
vtkParallelCoordinatesView::SetInpsectModeToSelectData
void SetInpsectModeToSelectData()
Definition: vtkParallelCoordinatesView.h:100
vtkParallelCoordinatesView::SetBrushModeToAxisThreshold
void SetBrushModeToAxisThreshold()
Definition: vtkParallelCoordinatesView.h:88
vtkParallelCoordinatesView::SetAxisHighlightPosition
int SetAxisHighlightPosition(vtkParallelCoordinatesRepresentation *rep, double position)
Set the highlight position using normalized viewport coordinates.
vtkParallelCoordinatesView::SetBrushModeToFunction
void SetBrushModeToFunction()
Definition: vtkParallelCoordinatesView.h:87
vtkIndent
a simple class to control print indentation
Definition: vtkIndent.h:34
vtkParallelCoordinatesView::MaximumNumberOfBrushPoints
int MaximumNumberOfBrushPoints
Definition: vtkParallelCoordinatesView.h:130
vtkParallelCoordinatesView::SelectData
void SelectData(unsigned long event)
vtkParallelCoordinatesView::VTK_BRUSH_FUNCTION
@ VTK_BRUSH_FUNCTION
Definition: vtkParallelCoordinatesView.h:65
vtkParallelCoordinatesView
view to be used with vtkParallelCoordinatesRepresentation
Definition: vtkParallelCoordinatesView.h:55
vtkParallelCoordinatesView::ProcessEvents
void ProcessEvents(vtkObject *caller, unsigned long event, void *callData) override
Called to process events.
vtkParallelCoordinatesView::vtkParallelCoordinatesView
vtkParallelCoordinatesView()
vtkParallelCoordinatesView::AxisHighlightPosition
int AxisHighlightPosition
Definition: vtkParallelCoordinatesView.h:139
vtkParallelCoordinatesView::SetInspectMode
void SetInspectMode(int)
vtkParallelCoordinatesView::BrushActor
vtkSmartPointer< vtkActor2D > BrushActor
Definition: vtkParallelCoordinatesView.h:136
vtkParallelCoordinatesView::NumberOfBrushPoints
int NumberOfBrushPoints
Definition: vtkParallelCoordinatesView.h:131
vtkParallelCoordinatesView::HighlightSource
vtkSmartPointer< vtkOutlineSource > HighlightSource
Definition: vtkParallelCoordinatesView.h:123
vtkParallelCoordinatesView::GetBrushLine
void GetBrushLine(int line, vtkIdType &npts, vtkIdType const *&ptids)
vtkParallelCoordinatesView::BrushMapper
vtkSmartPointer< vtkPolyDataMapper2D > BrushMapper
Definition: vtkParallelCoordinatesView.h:135
vtkParallelCoordinatesView::BrushOperator
int BrushOperator
Definition: vtkParallelCoordinatesView.h:129
vtkParallelCoordinatesView::VTK_HIGHLIGHT_MIN
@ VTK_HIGHLIGHT_MIN
Definition: vtkParallelCoordinatesView.h:120
vtkActor2D
a actor that draws 2D data
Definition: vtkActor2D.h:40
vtkParallelCoordinatesView::VTK_BRUSH_AXISTHRESHOLD
@ VTK_BRUSH_AXISTHRESHOLD
Definition: vtkParallelCoordinatesView.h:66
vtkParallelCoordinatesView::BrushData
vtkSmartPointer< vtkPolyData > BrushData
Definition: vtkParallelCoordinatesView.h:134
vtkParallelCoordinatesView::InspectMode
int InspectMode
Definition: vtkParallelCoordinatesView.h:127
vtkAlgorithmOutput
Proxy object to connect input/output ports.
Definition: vtkAlgorithmOutput.h:37
vtkParallelCoordinatesView::ManipulateAxes
void ManipulateAxes(unsigned long event)
vtkPolyData
concrete dataset represents vertices, lines, polygons, and triangle strips
Definition: vtkPolyData.h:85
vtkParallelCoordinatesView::VTK_INSPECT_SELECT_DATA
@ VTK_INSPECT_SELECT_DATA
Definition: vtkParallelCoordinatesView.h:80
vtkParallelCoordinatesView::FirstFunctionBrushLineDrawn
int FirstFunctionBrushLineDrawn
Definition: vtkParallelCoordinatesView.h:138
vtkParallelCoordinatesView::New
static vtkParallelCoordinatesView * New()
vtkParallelCoordinatesView::SetAxisHighlightPosition
int SetAxisHighlightPosition(vtkParallelCoordinatesRepresentation *rep, int position)
Set/Get the position of axis highlights.
vtkParallelCoordinatesView::VTK_BRUSHOPERATOR_SUBTRACT
@ VTK_BRUSHOPERATOR_SUBTRACT
Definition: vtkParallelCoordinatesView.h:72
vtkParallelCoordinatesView::RebuildNeeded
bool RebuildNeeded
Definition: vtkParallelCoordinatesView.h:142
vtkParallelCoordinatesView::SetInspectModeToManipulateAxes
void SetInspectModeToManipulateAxes()
Definition: vtkParallelCoordinatesView.h:99
vtkParallelCoordinatesView::SetBrushModeToLasso
void SetBrushModeToLasso()
Definition: vtkParallelCoordinatesView.h:85
vtkParallelCoordinatesView::SetBrushOperator
void SetBrushOperator(int)
vtkParallelCoordinatesView::VTK_BRUSH_ANGLE
@ VTK_BRUSH_ANGLE
Definition: vtkParallelCoordinatesView.h:64
vtkParallelCoordinatesView::WorldBuildTime
vtkTimeStamp WorldBuildTime
Definition: vtkParallelCoordinatesView.h:141