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 -------------------------------------------------------------------------*/
41 #ifndef __vtkParallelCoordinatesView_h
42 #define __vtkParallelCoordinatesView_h
43 
44 #include <vtkRenderView.h>
45 
46 class vtkActor2D;
47 class vtkOutlineSource;
49 class vtkPolyData;
51 
53 {
54 public:
57  void PrintSelf(ostream &os, vtkIndent indent);
58 
59  //BTX
60  enum {VTK_BRUSH_LASSO=0,VTK_BRUSH_ANGLE,VTK_BRUSH_FUNCTION,VTK_BRUSH_AXISTHRESHOLD,VTK_BRUSH_MODECOUNT};
61  enum {VTK_BRUSHOPERATOR_ADD=0,VTK_BRUSHOPERATOR_SUBTRACT,VTK_BRUSHOPERATOR_INTERSECT,VTK_BRUSHOPERATOR_REPLACE,VTK_BRUSHOPERATOR_MODECOUNT};
62  enum {VTK_INSPECT_MANIPULATE_AXES=0, VTK_INSPECT_SELECT_DATA, VTK_INSPECT_MODECOUNT};
63  //ETX
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  virtual void ApplyViewTheme(vtkViewTheme* theme);
91 
92 protected:
94  virtual ~vtkParallelCoordinatesView();
95 
97  //BTX
98  enum {VTK_HIGHLIGHT_CENTER=0,VTK_HIGHLIGHT_MIN,VTK_HIGHLIGHT_MAX};
102  //ETX
103 
110  //BTX
114  //ETX
115 
118 
121 
122  virtual void ProcessEvents(vtkObject *caller, unsigned long event, void *callData);
124 
125  void PrepareForRendering();
126 
128 
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 
137  int SetAxisHighlightPosition(vtkParallelCoordinatesRepresentation* rep, int position);
138 
140  int SetAxisHighlightPosition(vtkParallelCoordinatesRepresentation* rep, double position);
141 
142  int AddLassoBrushPoint(double *p);
143  int SetBrushLine(int line, double *p1, double *p2);
144  void GetBrushLine(int line, vtkIdType &npts, vtkIdType* &ptids);
145  int SetAngleBrushLine(double *p1, double *p2);
146  int SetFunctionBrushLine1(double *p1, double *p2);
147  int SetFunctionBrushLine2(double *p1, double *p2);
148  void ClearBrushPoints();
149 
150 
151 private:
152  vtkParallelCoordinatesView(const vtkParallelCoordinatesView&); // Not implemented
153  void operator=(const vtkParallelCoordinatesView&); // Not implemented
154 
155 };
156 
157 #endif