VTK
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 "vtkViewsInfovisModule.h" // For export macro
46 #include "vtkRenderView.h"
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 {VTK_BRUSH_LASSO=0,VTK_BRUSH_ANGLE,VTK_BRUSH_FUNCTION,VTK_BRUSH_AXISTHRESHOLD,VTK_BRUSH_MODECOUNT};
62  enum {VTK_BRUSHOPERATOR_ADD=0,VTK_BRUSHOPERATOR_SUBTRACT,VTK_BRUSHOPERATOR_INTERSECT,VTK_BRUSHOPERATOR_REPLACE,VTK_BRUSHOPERATOR_MODECOUNT};
63  enum {VTK_INSPECT_MANIPULATE_AXES=0, VTK_INSPECT_SELECT_DATA, VTK_INSPECT_MODECOUNT};
64 
65  void SetBrushMode(int);
66  void SetBrushModeToLasso() { this->SetBrushMode(VTK_BRUSH_LASSO); }
67  void SetBrushModeToAngle() { this->SetBrushMode(VTK_BRUSH_ANGLE); }
68  void SetBrushModeToFunction() { this->SetBrushMode(VTK_BRUSH_FUNCTION); }
69  void SetBrushModeToAxisThreshold() { this->SetBrushMode(VTK_BRUSH_AXISTHRESHOLD); }
70  vtkGetMacro(BrushMode,int);
71 
72  void SetBrushOperator(int);
73  void SetBrushOperatorToAdd() { this->SetBrushOperator(VTK_BRUSHOPERATOR_ADD); }
74  void SetBrushOperatorToSubtract() { this->SetBrushOperator(VTK_BRUSHOPERATOR_SUBTRACT); }
75  void SetBrushOperatorToIntersect() { this->SetBrushOperator(VTK_BRUSHOPERATOR_INTERSECT); }
76  void SetBrushOperatorToReplace() { this->SetBrushOperator(VTK_BRUSHOPERATOR_REPLACE); }
77  vtkGetMacro(BrushOperator,int);
78 
79  void SetInspectMode(int);
80  void SetInspectModeToManipulateAxes() { this->SetInspectMode(VTK_INSPECT_MANIPULATE_AXES); }
81  void SetInpsectModeToSelectData() { this->SetInspectMode(VTK_INSPECT_SELECT_DATA); }
82  vtkGetMacro(InspectMode,int);
83 
84  void SetMaximumNumberOfBrushPoints(int);
85  vtkGetMacro(MaximumNumberOfBrushPoints,int);
86 
87  vtkSetMacro(CurrentBrushClass,int);
88  vtkGetMacro(CurrentBrushClass,int);
89 
90  void ApplyViewTheme(vtkViewTheme* theme) override;
91 
92 protected:
94  ~vtkParallelCoordinatesView() override;
95 
97 
98  enum {VTK_HIGHLIGHT_CENTER=0,VTK_HIGHLIGHT_MIN,VTK_HIGHLIGHT_MAX};
102 
109 
113 
116 
119 
120  void ProcessEvents(vtkObject *caller, unsigned long event, void *callData) override;
122 
123  void PrepareForRendering() override;
124 
126 
129  void Hover(unsigned long event);
130  void ManipulateAxes(unsigned long event);
131  void SelectData(unsigned long event);
132  void Zoom(unsigned long event);
133  void Pan(unsigned long event);
135 
139  int SetAxisHighlightPosition(vtkParallelCoordinatesRepresentation* rep, int position);
140 
144  int SetAxisHighlightPosition(vtkParallelCoordinatesRepresentation* rep, double position);
145 
146  int AddLassoBrushPoint(double *p);
147  int SetBrushLine(int line, double *p1, double *p2);
148  void GetBrushLine(int line, vtkIdType &npts, vtkIdType* &ptids);
149  int SetAngleBrushLine(double *p1, double *p2);
150  int SetFunctionBrushLine1(double *p1, double *p2);
151  int SetFunctionBrushLine2(double *p1, double *p2);
152  void ClearBrushPoints();
153 
154 
155 private:
157  void operator=(const vtkParallelCoordinatesView&) = delete;
158 
159 };
160 
161 #endif
vtkParallelCoordinatesRepresentation
Data representation that takes generic multivariate data and produces a parallel coordinates plot.
Definition: vtkParallelCoordinatesRepresentation.h:85
vtkPolyDataMapper2D
draw vtkPolyData onto the image plane
Definition: vtkPolyDataMapper2D.h:45
vtkParallelCoordinatesView::HighlightMapper
vtkSmartPointer< vtkPolyDataMapper2D > HighlightMapper
Definition: vtkParallelCoordinatesView.h:100
vtkRenderView
A view containing a renderer.
Definition: vtkRenderView.h:58
vtkParallelCoordinatesView::VTK_INSPECT_SELECT_DATA
Definition: vtkParallelCoordinatesView.h:63
vtkOutlineSource
create wireframe outline around bounding box
Definition: vtkOutlineSource.h:36
vtkParallelCoordinatesView::SetBrushOperatorToReplace
void SetBrushOperatorToReplace()
Definition: vtkParallelCoordinatesView.h:76
vtkIdType
int vtkIdType
Definition: vtkType.h:347
vtkParallelCoordinatesView::SetBrushModeToAngle
void SetBrushModeToAngle()
Definition: vtkParallelCoordinatesView.h:67
vtkParallelCoordinatesView::SetBrushOperatorToIntersect
void SetBrushOperatorToIntersect()
Definition: vtkParallelCoordinatesView.h:75
vtkTimeStamp
record modification and/or execution time
Definition: vtkTimeStamp.h:32
vtkObject
abstract base class for most VTK objects
Definition: vtkObject.h:53
vtkSmartPointer< vtkOutlineSource >
vtkParallelCoordinatesView::SetBrushOperatorToSubtract
void SetBrushOperatorToSubtract()
Definition: vtkParallelCoordinatesView.h:74
vtkParallelCoordinatesView::SelectedAxisPosition
int SelectedAxisPosition
Definition: vtkParallelCoordinatesView.h:96
vtkParallelCoordinatesView::CurrentBrushClass
int CurrentBrushClass
Definition: vtkParallelCoordinatesView.h:108
vtkRenderView.h
vtkParallelCoordinatesView::SetBrushOperatorToAdd
void SetBrushOperatorToAdd()
Definition: vtkParallelCoordinatesView.h:73
vtkRenderView::ProcessEvents
void ProcessEvents(vtkObject *caller, unsigned long eventId, void *callData) override
Called to process events.
vtkParallelCoordinatesView::BrushMode
int BrushMode
Definition: vtkParallelCoordinatesView.h:104
vtkViewTheme
Sets theme colors for a graphical view.
Definition: vtkViewTheme.h:42
vtkX3D::position
Definition: vtkX3D.h:261
vtkParallelCoordinatesView::HighlightActor
vtkSmartPointer< vtkActor2D > HighlightActor
Definition: vtkParallelCoordinatesView.h:101
vtkDataRepresentation
The superclass for all representations.
Definition: vtkDataRepresentation.h:66
vtkParallelCoordinatesView::SetInpsectModeToSelectData
void SetInpsectModeToSelectData()
Definition: vtkParallelCoordinatesView.h:81
vtkParallelCoordinatesView::SetBrushModeToAxisThreshold
void SetBrushModeToAxisThreshold()
Definition: vtkParallelCoordinatesView.h:69
vtkParallelCoordinatesView::SetBrushModeToFunction
void SetBrushModeToFunction()
Definition: vtkParallelCoordinatesView.h:68
vtkIndent
a simple class to control print indentation
Definition: vtkIndent.h:33
vtkRenderView::New
static vtkRenderView * New()
vtkParallelCoordinatesView::MaximumNumberOfBrushPoints
int MaximumNumberOfBrushPoints
Definition: vtkParallelCoordinatesView.h:106
vtkParallelCoordinatesView
view to be used with vtkParallelCoordinatesRepresentation
Definition: vtkParallelCoordinatesView.h:54
vtkParallelCoordinatesView::AxisHighlightPosition
int AxisHighlightPosition
Definition: vtkParallelCoordinatesView.h:115
vtkRenderView::PrepareForRendering
void PrepareForRendering() override
Called by the view when the renderer is about to render.
vtkRenderView::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
vtkParallelCoordinatesView::BrushActor
vtkSmartPointer< vtkActor2D > BrushActor
Definition: vtkParallelCoordinatesView.h:112
vtkParallelCoordinatesView::NumberOfBrushPoints
int NumberOfBrushPoints
Definition: vtkParallelCoordinatesView.h:107
vtkParallelCoordinatesView::HighlightSource
vtkSmartPointer< vtkOutlineSource > HighlightSource
Definition: vtkParallelCoordinatesView.h:99
vtkParallelCoordinatesView::BrushMapper
vtkSmartPointer< vtkPolyDataMapper2D > BrushMapper
Definition: vtkParallelCoordinatesView.h:111
vtkParallelCoordinatesView::VTK_BRUSHOPERATOR_SUBTRACT
Definition: vtkParallelCoordinatesView.h:62
vtkParallelCoordinatesView::BrushOperator
int BrushOperator
Definition: vtkParallelCoordinatesView.h:105
vtkActor2D
a actor that draws 2D data
Definition: vtkActor2D.h:39
vtkParallelCoordinatesView::BrushData
vtkSmartPointer< vtkPolyData > BrushData
Definition: vtkParallelCoordinatesView.h:110
vtkParallelCoordinatesView::InspectMode
int InspectMode
Definition: vtkParallelCoordinatesView.h:103
vtkAlgorithmOutput
Proxy object to connect input/output ports.
Definition: vtkAlgorithmOutput.h:36
vtkPolyData
concrete dataset represents vertices, lines, polygons, and triangle strips
Definition: vtkPolyData.h:79
vtkParallelCoordinatesView::FirstFunctionBrushLineDrawn
int FirstFunctionBrushLineDrawn
Definition: vtkParallelCoordinatesView.h:114
vtkParallelCoordinatesView::VTK_HIGHLIGHT_MIN
Definition: vtkParallelCoordinatesView.h:98
vtkView::CreateDefaultRepresentation
virtual vtkDataRepresentation * CreateDefaultRepresentation(vtkAlgorithmOutput *conn)
Create a default vtkDataRepresentation for the given vtkAlgorithmOutput.
vtkParallelCoordinatesView::RebuildNeeded
bool RebuildNeeded
Definition: vtkParallelCoordinatesView.h:118
vtkParallelCoordinatesView::SetInspectModeToManipulateAxes
void SetInspectModeToManipulateAxes()
Definition: vtkParallelCoordinatesView.h:80
vtkParallelCoordinatesView::SetBrushModeToLasso
void SetBrushModeToLasso()
Definition: vtkParallelCoordinatesView.h:66
vtkRenderView::ApplyViewTheme
void ApplyViewTheme(vtkViewTheme *theme) override
Applies a view theme to this view.
vtkParallelCoordinatesView::WorldBuildTime
vtkTimeStamp WorldBuildTime
Definition: vtkParallelCoordinatesView.h:117