VTK  9.1.0
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 -------------------------------------------------------------------------*/
61 #ifndef vtkParallelCoordinatesView_h
62 #define vtkParallelCoordinatesView_h
63 
64 #include "vtkRenderView.h"
65 #include "vtkViewsInfovisModule.h" // For export macro
66 
67 class vtkActor2D;
68 class vtkOutlineSource;
70 class vtkPolyData;
72 
73 class VTKVIEWSINFOVIS_EXPORT vtkParallelCoordinatesView : public vtkRenderView
74 {
75 public:
78  void PrintSelf(ostream& os, vtkIndent indent) override;
79 
80  enum
81  {
82  VTK_BRUSH_LASSO = 0,
86  VTK_BRUSH_MODECOUNT
87  };
88  enum
89  {
90  VTK_BRUSHOPERATOR_ADD = 0,
94  VTK_BRUSHOPERATOR_MODECOUNT
95  };
96  enum
97  {
98  VTK_INSPECT_MANIPULATE_AXES = 0,
100  VTK_INSPECT_MODECOUNT
101  };
102 
103  void SetBrushMode(int);
104  void SetBrushModeToLasso() { this->SetBrushMode(VTK_BRUSH_LASSO); }
105  void SetBrushModeToAngle() { this->SetBrushMode(VTK_BRUSH_ANGLE); }
106  void SetBrushModeToFunction() { this->SetBrushMode(VTK_BRUSH_FUNCTION); }
107  void SetBrushModeToAxisThreshold() { this->SetBrushMode(VTK_BRUSH_AXISTHRESHOLD); }
108  vtkGetMacro(BrushMode, int);
109 
110  void SetBrushOperator(int);
111  void SetBrushOperatorToAdd() { this->SetBrushOperator(VTK_BRUSHOPERATOR_ADD); }
112  void SetBrushOperatorToSubtract() { this->SetBrushOperator(VTK_BRUSHOPERATOR_SUBTRACT); }
113  void SetBrushOperatorToIntersect() { this->SetBrushOperator(VTK_BRUSHOPERATOR_INTERSECT); }
114  void SetBrushOperatorToReplace() { this->SetBrushOperator(VTK_BRUSHOPERATOR_REPLACE); }
115  vtkGetMacro(BrushOperator, int);
116 
117  void SetInspectMode(int);
118  void SetInspectModeToManipulateAxes() { this->SetInspectMode(VTK_INSPECT_MANIPULATE_AXES); }
119  void SetInpsectModeToSelectData() { this->SetInspectMode(VTK_INSPECT_SELECT_DATA); }
120  vtkGetMacro(InspectMode, int);
121 
123  vtkGetMacro(MaximumNumberOfBrushPoints, int);
124 
125  vtkSetMacro(CurrentBrushClass, int);
126  vtkGetMacro(CurrentBrushClass, int);
127 
128  void ApplyViewTheme(vtkViewTheme* theme) override;
129 
130 protected:
133 
135 
136  enum
137  {
138  VTK_HIGHLIGHT_CENTER = 0,
140  VTK_HIGHLIGHT_MAX
141  };
145 
152 
156 
159 
162 
163  void ProcessEvents(vtkObject* caller, unsigned long event, void* callData) override;
165 
166  void PrepareForRendering() override;
167 
169 
172  void Hover(unsigned long event);
173  void ManipulateAxes(unsigned long event);
174  void SelectData(unsigned long event);
175  void Zoom(unsigned long event);
176  void Pan(unsigned long event);
178 
183 
188 
189  int AddLassoBrushPoint(double* p);
190  int SetBrushLine(int line, double* p1, double* p2);
191  void GetBrushLine(int line, vtkIdType& npts, vtkIdType const*& ptids);
192  int SetAngleBrushLine(double* p1, double* p2);
193  int SetFunctionBrushLine1(double* p1, double* p2);
194  int SetFunctionBrushLine2(double* p1, double* p2);
196 
197 private:
199  void operator=(const vtkParallelCoordinatesView&) = delete;
200 };
201 
202 #endif
vtkParallelCoordinatesRepresentation
Data representation that takes generic multivariate data and produces a parallel coordinates plot.
Definition: vtkParallelCoordinatesRepresentation.h:105
vtkPolyDataMapper2D
draw vtkPolyData onto the image plane
Definition: vtkPolyDataMapper2D.h:154
vtkParallelCoordinatesView::HighlightMapper
vtkSmartPointer< vtkPolyDataMapper2D > HighlightMapper
Definition: vtkParallelCoordinatesView.h:143
vtkRenderView
A view containing a renderer.
Definition: vtkRenderView.h:84
vtkParallelCoordinatesView::ApplyViewTheme
void ApplyViewTheme(vtkViewTheme *theme) override
vtkOutlineSource
create wireframe outline around bounding box
Definition: vtkOutlineSource.h:37
vtkParallelCoordinatesView::SetBrushOperatorToReplace
void SetBrushOperatorToReplace()
Definition: vtkParallelCoordinatesView.h:114
vtkIdType
int vtkIdType
Definition: vtkType.h:332
vtkParallelCoordinatesView::VTK_BRUSHOPERATOR_SUBTRACT
@ VTK_BRUSHOPERATOR_SUBTRACT
Definition: vtkParallelCoordinatesView.h:91
vtkParallelCoordinatesView::SetBrushModeToAngle
void SetBrushModeToAngle()
Definition: vtkParallelCoordinatesView.h:105
vtkParallelCoordinatesView::CreateDefaultRepresentation
vtkDataRepresentation * CreateDefaultRepresentation(vtkAlgorithmOutput *conn) override
Create a default vtkDataRepresentation for the given vtkAlgorithmOutput.
vtkParallelCoordinatesView::SetBrushOperatorToIntersect
void SetBrushOperatorToIntersect()
Definition: vtkParallelCoordinatesView.h:113
vtkTimeStamp
record modification and/or execution time
Definition: vtkTimeStamp.h:52
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:82
vtkSmartPointer< vtkOutlineSource >
vtkParallelCoordinatesView::SetBrushMode
void SetBrushMode(int)
vtkParallelCoordinatesView::SetBrushOperatorToSubtract
void SetBrushOperatorToSubtract()
Definition: vtkParallelCoordinatesView.h:112
vtkParallelCoordinatesView::VTK_INSPECT_SELECT_DATA
@ VTK_INSPECT_SELECT_DATA
Definition: vtkParallelCoordinatesView.h:99
vtkParallelCoordinatesView::SetBrushLine
int SetBrushLine(int line, double *p1, double *p2)
vtkParallelCoordinatesView::SelectedAxisPosition
int SelectedAxisPosition
Definition: vtkParallelCoordinatesView.h:134
vtkParallelCoordinatesView::CurrentBrushClass
int CurrentBrushClass
Definition: vtkParallelCoordinatesView.h:151
vtkParallelCoordinatesView::SetFunctionBrushLine1
int SetFunctionBrushLine1(double *p1, double *p2)
vtkParallelCoordinatesView::Zoom
void Zoom(unsigned long event)
Handle axis manipulation.
vtkParallelCoordinatesView::VTK_BRUSH_ANGLE
@ VTK_BRUSH_ANGLE
Definition: vtkParallelCoordinatesView.h:83
vtkRenderView.h
vtkParallelCoordinatesView::Hover
void Hover(unsigned long event)
Handle axis manipulation.
vtkParallelCoordinatesView::SetBrushOperatorToAdd
void SetBrushOperatorToAdd()
Definition: vtkParallelCoordinatesView.h:111
vtkParallelCoordinatesView::ClearBrushPoints
void ClearBrushPoints()
vtkParallelCoordinatesView::VTK_BRUSHOPERATOR_INTERSECT
@ VTK_BRUSHOPERATOR_INTERSECT
Definition: vtkParallelCoordinatesView.h:92
vtkParallelCoordinatesView::Pan
void Pan(unsigned long event)
Handle axis manipulation.
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:147
vtkParallelCoordinatesView::SetMaximumNumberOfBrushPoints
void SetMaximumNumberOfBrushPoints(int)
vtkViewTheme
Sets theme colors for a graphical view.
Definition: vtkViewTheme.h:132
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:144
vtkDataRepresentation
The superclass for all representations.
Definition: vtkDataRepresentation.h:92
vtkParallelCoordinatesView::SetInpsectModeToSelectData
void SetInpsectModeToSelectData()
Definition: vtkParallelCoordinatesView.h:119
vtkParallelCoordinatesView::SetBrushModeToAxisThreshold
void SetBrushModeToAxisThreshold()
Definition: vtkParallelCoordinatesView.h:107
vtkParallelCoordinatesView::SetAxisHighlightPosition
int SetAxisHighlightPosition(vtkParallelCoordinatesRepresentation *rep, double position)
Set the highlight position using normalized viewport coordinates.
vtkParallelCoordinatesView::SetBrushModeToFunction
void SetBrushModeToFunction()
Definition: vtkParallelCoordinatesView.h:106
vtkIndent
a simple class to control print indentation
Definition: vtkIndent.h:113
vtkParallelCoordinatesView::MaximumNumberOfBrushPoints
int MaximumNumberOfBrushPoints
Definition: vtkParallelCoordinatesView.h:149
vtkParallelCoordinatesView::SelectData
void SelectData(unsigned long event)
Handle axis manipulation.
vtkParallelCoordinatesView
view to be used with vtkParallelCoordinatesRepresentation
Definition: vtkParallelCoordinatesView.h:74
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:158
vtkParallelCoordinatesView::SetInspectMode
void SetInspectMode(int)
vtkParallelCoordinatesView::VTK_HIGHLIGHT_MIN
@ VTK_HIGHLIGHT_MIN
Definition: vtkParallelCoordinatesView.h:139
vtkParallelCoordinatesView::BrushActor
vtkSmartPointer< vtkActor2D > BrushActor
Definition: vtkParallelCoordinatesView.h:155
vtkParallelCoordinatesView::NumberOfBrushPoints
int NumberOfBrushPoints
Definition: vtkParallelCoordinatesView.h:150
vtkParallelCoordinatesView::VTK_BRUSHOPERATOR_REPLACE
@ VTK_BRUSHOPERATOR_REPLACE
Definition: vtkParallelCoordinatesView.h:93
vtkParallelCoordinatesView::HighlightSource
vtkSmartPointer< vtkOutlineSource > HighlightSource
Definition: vtkParallelCoordinatesView.h:142
vtkParallelCoordinatesView::GetBrushLine
void GetBrushLine(int line, vtkIdType &npts, vtkIdType const *&ptids)
vtkParallelCoordinatesView::BrushMapper
vtkSmartPointer< vtkPolyDataMapper2D > BrushMapper
Definition: vtkParallelCoordinatesView.h:154
vtkParallelCoordinatesView::BrushOperator
int BrushOperator
Definition: vtkParallelCoordinatesView.h:148
vtkActor2D
a actor that draws 2D data
Definition: vtkActor2D.h:149
vtkParallelCoordinatesView::VTK_BRUSH_FUNCTION
@ VTK_BRUSH_FUNCTION
Definition: vtkParallelCoordinatesView.h:84
vtkParallelCoordinatesView::VTK_BRUSH_AXISTHRESHOLD
@ VTK_BRUSH_AXISTHRESHOLD
Definition: vtkParallelCoordinatesView.h:85
vtkParallelCoordinatesView::BrushData
vtkSmartPointer< vtkPolyData > BrushData
Definition: vtkParallelCoordinatesView.h:153
vtkParallelCoordinatesView::InspectMode
int InspectMode
Definition: vtkParallelCoordinatesView.h:146
vtkAlgorithmOutput
Proxy object to connect input/output ports.
Definition: vtkAlgorithmOutput.h:66
vtkParallelCoordinatesView::ManipulateAxes
void ManipulateAxes(unsigned long event)
Handle axis manipulation.
vtkPolyData
concrete dataset represents vertices, lines, polygons, and triangle strips
Definition: vtkPolyData.h:195
vtkParallelCoordinatesView::FirstFunctionBrushLineDrawn
int FirstFunctionBrushLineDrawn
Definition: vtkParallelCoordinatesView.h:157
vtkParallelCoordinatesView::New
static vtkParallelCoordinatesView * New()
vtkParallelCoordinatesView::SetAxisHighlightPosition
int SetAxisHighlightPosition(vtkParallelCoordinatesRepresentation *rep, int position)
Set/Get the position of axis highlights.
vtkParallelCoordinatesView::RebuildNeeded
bool RebuildNeeded
Definition: vtkParallelCoordinatesView.h:161
vtkParallelCoordinatesView::SetInspectModeToManipulateAxes
void SetInspectModeToManipulateAxes()
Definition: vtkParallelCoordinatesView.h:118
vtkParallelCoordinatesView::SetBrushModeToLasso
void SetBrushModeToLasso()
Definition: vtkParallelCoordinatesView.h:104
vtkParallelCoordinatesView::SetBrushOperator
void SetBrushOperator(int)
vtkParallelCoordinatesView::WorldBuildTime
vtkTimeStamp WorldBuildTime
Definition: vtkParallelCoordinatesView.h:160