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