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 -------------------------------------------------------------------------*/
44 #ifndef vtkParallelCoordinatesView_h
45 #define vtkParallelCoordinatesView_h
46 
47 #include "vtkViewsInfovisModule.h" // For export macro
48 #include "vtkRenderView.h"
49 
50 class vtkActor2D;
51 class vtkOutlineSource;
53 class vtkPolyData;
55 
57 {
58 public:
61  void PrintSelf(ostream &os, vtkIndent indent);
62 
63  //BTX
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  //ETX
68 
69  void SetBrushMode(int);
70  void SetBrushModeToLasso() { this->SetBrushMode(VTK_BRUSH_LASSO); }
71  void SetBrushModeToAngle() { this->SetBrushMode(VTK_BRUSH_ANGLE); }
72  void SetBrushModeToFunction() { this->SetBrushMode(VTK_BRUSH_FUNCTION); }
73  void SetBrushModeToAxisThreshold() { this->SetBrushMode(VTK_BRUSH_AXISTHRESHOLD); }
74  vtkGetMacro(BrushMode,int);
75 
76  void SetBrushOperator(int);
77  void SetBrushOperatorToAdd() { this->SetBrushOperator(VTK_BRUSHOPERATOR_ADD); }
78  void SetBrushOperatorToSubtract() { this->SetBrushOperator(VTK_BRUSHOPERATOR_SUBTRACT); }
79  void SetBrushOperatorToIntersect() { this->SetBrushOperator(VTK_BRUSHOPERATOR_INTERSECT); }
80  void SetBrushOperatorToReplace() { this->SetBrushOperator(VTK_BRUSHOPERATOR_REPLACE); }
81  vtkGetMacro(BrushOperator,int);
82 
83  void SetInspectMode(int);
84  void SetInspectModeToManipulateAxes() { this->SetInspectMode(VTK_INSPECT_MANIPULATE_AXES); }
85  void SetInpsectModeToSelectData() { this->SetInspectMode(VTK_INSPECT_SELECT_DATA); }
86  vtkGetMacro(InspectMode,int);
87 
88  void SetMaximumNumberOfBrushPoints(int);
89  vtkGetMacro(MaximumNumberOfBrushPoints,int);
90 
91  vtkSetMacro(CurrentBrushClass,int);
92  vtkGetMacro(CurrentBrushClass,int);
93 
94  virtual void ApplyViewTheme(vtkViewTheme* theme);
95 
96 protected:
98  virtual ~vtkParallelCoordinatesView();
99 
101  //BTX
102  enum {VTK_HIGHLIGHT_CENTER=0,VTK_HIGHLIGHT_MIN,VTK_HIGHLIGHT_MAX};
106  //ETX
107 
114  //BTX
118  //ETX
119 
122 
125 
126  virtual void ProcessEvents(vtkObject *caller, unsigned long event, void *callData);
128 
129  void PrepareForRendering();
130 
132 
133  void Hover(unsigned long event);
134  void ManipulateAxes(unsigned long event);
135  void SelectData(unsigned long event);
136  void Zoom(unsigned long event);
137  void Pan(unsigned long event);
139 
141  int SetAxisHighlightPosition(vtkParallelCoordinatesRepresentation* rep, int position);
142 
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&); // Not implemented
157  void operator=(const vtkParallelCoordinatesView&); // Not implemented
158 
159 };
160 
161 #endif
vtkSmartPointer< vtkPolyData > BrushData
abstract base class for most VTK objects
Definition: vtkObject.h:61
a actor that draws 2D data
Definition: vtkActor2D.h:44
record modification and/or execution time
Definition: vtkTimeStamp.h:34
virtual void ApplyViewTheme(vtkViewTheme *theme)
static vtkRenderView * New()
int vtkIdType
Definition: vtkType.h:275
concrete dataset represents vertices, lines, polygons, and triangle strips
Definition: vtkPolyData.h:83
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:47
a simple class to control print indentation
Definition: vtkIndent.h:38
The superclass for all representations.
create wireframe outline around bounding box
virtual void ProcessEvents(vtkObject *caller, unsigned long eventId, void *callData)
vtkSmartPointer< vtkActor2D > HighlightActor
virtual void PrepareForRendering()
A view containing a renderer.
Definition: vtkRenderView.h:63
vtkSmartPointer< vtkActor2D > BrushActor
vtkSmartPointer< vtkOutlineSource > HighlightSource
vtkSmartPointer< vtkPolyDataMapper2D > BrushMapper
void PrintSelf(ostream &os, vtkIndent indent)
draw vtkPolyData onto the image plane
#define VTKVIEWSINFOVIS_EXPORT
Data representation that takes generic multivariate data and produces a parallel coordinates plot...
virtual vtkDataRepresentation * CreateDefaultRepresentation(vtkAlgorithmOutput *conn)