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) VTK_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) VTK_OVERRIDE;
91 
92 protected:
94  ~vtkParallelCoordinatesView() VTK_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) VTK_OVERRIDE;
122 
123  void PrepareForRendering() VTK_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:
156  vtkParallelCoordinatesView(const vtkParallelCoordinatesView&) VTK_DELETE_FUNCTION;
157  void operator=(const vtkParallelCoordinatesView&) VTK_DELETE_FUNCTION;
158 
159 };
160 
161 #endif
vtkSmartPointer< vtkPolyData > BrushData
abstract base class for most VTK objects
Definition: vtkObject.h:53
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:345
concrete dataset represents vertices, lines, polygons, and triangle strips
Definition: vtkPolyData.h:79
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
vtkSetMacro(IgnoreDriverBugs, bool)
When set known driver bugs are ignored during driver feature detection.
A view containing a renderer.
Definition: vtkRenderView.h:58
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.