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);
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  virtual void ApplyViewTheme(vtkViewTheme* theme);
94 
95 protected:
97  virtual ~vtkParallelCoordinatesView();
98 
100 
101  enum {VTK_HIGHLIGHT_CENTER=0,VTK_HIGHLIGHT_MIN,VTK_HIGHLIGHT_MAX};
105 
112 
116 
119 
122 
123  virtual void ProcessEvents(vtkObject *caller, unsigned long event, void *callData);
125 
126  void PrepareForRendering();
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:
159  vtkParallelCoordinatesView(const vtkParallelCoordinatesView&) VTK_DELETE_FUNCTION;
160  void operator=(const vtkParallelCoordinatesView&) VTK_DELETE_FUNCTION;
161 
162 };
163 
164 #endif
vtkSmartPointer< vtkPolyData > BrushData
abstract base class for most VTK objects
Definition: vtkObject.h:59
a actor that draws 2D data
Definition: vtkActor2D.h:45
record modification and/or execution time
Definition: vtkTimeStamp.h:35
virtual void ApplyViewTheme(vtkViewTheme *theme)
Applies a view theme to this view.
static vtkRenderView * New()
int vtkIdType
Definition: vtkType.h:287
concrete dataset represents vertices, lines, polygons, and triangle strips
Definition: vtkPolyData.h:85
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:48
a simple class to control print indentation
Definition: vtkIndent.h:39
The superclass for all representations.
create wireframe outline around bounding box
virtual void ProcessEvents(vtkObject *caller, unsigned long eventId, void *callData)
Called to process events.
vtkSmartPointer< vtkActor2D > HighlightActor
virtual void PrepareForRendering()
Called by the view when the renderer is about to render.
vtkSetMacro(IgnoreDriverBugs, bool)
When set known driver bugs are ignored during driver feature detection.
A view containing a renderer.
Definition: vtkRenderView.h:61
vtkSmartPointer< vtkActor2D > BrushActor
vtkSmartPointer< vtkOutlineSource > HighlightSource
vtkSmartPointer< vtkPolyDataMapper2D > BrushMapper
void PrintSelf(ostream &os, vtkIndent indent)
Methods invoked by print to print information about the object including superclasses.
draw vtkPolyData onto the image plane
Data representation that takes generic multivariate data and produces a parallel coordinates plot...
virtual vtkDataRepresentation * CreateDefaultRepresentation(vtkAlgorithmOutput *conn)
Create a default vtkDataRepresentation for the given vtkAlgorithmOutput.