VTK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
vtkConvertSelection.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkConvertSelection.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 (c) Sandia Corporation
17  See Copyright.txt or http://www.paraview.org/HTML/Copyright.html for details.
18 ----------------------------------------------------------------------------*/
41 #ifndef __vtkConvertSelection_h
42 #define __vtkConvertSelection_h
43 
44 #include "vtkFiltersExtractionModule.h" // For export macro
45 #include "vtkSelectionAlgorithm.h"
46 
48 class vtkGraph;
49 class vtkIdTypeArray;
50 class vtkSelection;
51 class vtkSelectionNode;
52 class vtkStringArray;
53 class vtkTable;
55 
57 {
58 public:
59  static vtkConvertSelection *New();
61  void PrintSelf(ostream& os, vtkIndent indent);
62 
65  void SetDataObjectConnection(vtkAlgorithmOutput* in);
66 
68 
72  vtkSetMacro(InputFieldType, int);
73  vtkGetMacro(InputFieldType, int);
75 
77 
79  vtkSetMacro(OutputType, int);
80  vtkGetMacro(OutputType, int);
82 
84 
85  virtual void SetArrayName(const char*);
86  virtual const char* GetArrayName();
88 
90 
91  virtual void SetArrayNames(vtkStringArray*);
92  vtkGetObjectMacro(ArrayNames, vtkStringArray);
94 
96 
97  void AddArrayName(const char*);
98  void ClearArrayNames();
100 
102 
104  vtkSetMacro(MatchAnyValues, bool);
105  vtkGetMacro(MatchAnyValues, bool);
106  vtkBooleanMacro(MatchAnyValues, bool);
108 
110 
111  virtual void SetSelectionExtractor(vtkExtractSelection*);
112  vtkGetObjectMacro(SelectionExtractor,vtkExtractSelection);
114 
116 
119  static vtkSelection* ToIndexSelection(
122  static vtkSelection* ToGlobalIdSelection(
125  static vtkSelection* ToPedigreeIdSelection(
128  static vtkSelection* ToValueSelection(
131  const char* arrayName);
132  static vtkSelection* ToValueSelection(
135  vtkStringArray* arrayNames);
137 
139 
142  static void GetSelectedItems(
145  int fieldType,
148 
150 
152  static void GetSelectedVertices(
154  vtkGraph* data,
156  static void GetSelectedEdges(
158  vtkGraph* data,
160  static void GetSelectedPoints(
162  vtkDataSet* data,
164  static void GetSelectedCells(
166  vtkDataSet* data,
168  static void GetSelectedRows(
170  vtkTable* data,
173 
175 
177  static vtkSelection* ToSelectionType(
180  int type,
181  vtkStringArray* arrayNames = 0,
182  int inputFieldType = -1);
184 
185 protected:
188 
189  virtual int RequestData(
190  vtkInformation *,
193 
194  int Convert(
197  vtkSelection* output);
198 
199  int ConvertCompositeDataSet(
202  vtkSelection* output);
203 
204  int ConvertToIndexSelection(
206  vtkDataSet* data,
207  vtkSelectionNode* output);
208 
209  int SelectTableFromTable(
210  vtkTable* selTable,
211  vtkTable* dataTable,
213 
214  int ConvertToBlockSelection(
216 
217  virtual int FillInputPortInformation(
218  int port, vtkInformation* info);
219 
225 
226 private:
227  vtkConvertSelection(const vtkConvertSelection&); // Not implemented.
228  void operator=(const vtkConvertSelection&); // Not implemented.
229 };
230 
231 #endif
GLsizei GLsizei GLenum GLenum const GLvoid * data
Definition: vtkgl.h:11339
A node in a selection tree. Used to store selection results.
GLuint GLuint GLsizei GLenum type
Definition: vtkgl.h:11315
Store vtkAlgorithm input/output information.
GLenum GLenum GLenum input
Definition: vtkgl.h:15941
virtual int FillInputPortInformation(int port, vtkInformation *info)
abstract class to specify dataset behavior
Definition: vtkDataSet.h:60
#define vtkGetMacro(name, type)
Definition: vtkSetGet.h:83
vtkExtractSelection * SelectionExtractor
a vtkAbstractArray subclass for strings
A node in a selection tree. Used to store selection results.
Definition: vtkSelection.h:44
GLuint in
Definition: vtkgl.h:16905
dynamic, self-adjusting array of vtkIdType
#define vtkTypeMacro(thisClass, superclass)
Definition: vtkSetGet.h:619
Proxy object to connect input/output ports.
Base class for graph data types.
Definition: vtkGraph.h:288
abstract superclass for composite (multi-block or AMR) datasets
static vtkSelectionAlgorithm * New()
a simple class to control print indentation
Definition: vtkIndent.h:38
#define VTKFILTERSEXTRACTION_EXPORT
GLuint GLuint GLsizei GLenum const GLvoid * indices
Definition: vtkgl.h:11315
#define vtkGetObjectMacro(name, type)
Definition: vtkSetGet.h:222
Superclass for algorithms that produce only Selection as output.
vtkStringArray * ArrayNames
extract a subset from a vtkDataSet.
A table, which contains similar-typed columns of data.
Definition: vtkTable.h:67
virtual int RequestData(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector)
Store zero or more vtkInformation instances.
#define vtkBooleanMacro(name, type)
Definition: vtkSetGet.h:234
Convert a selection from one type to another.
general representation of visualization data
Definition: vtkDataObject.h:64
void PrintSelf(ostream &os, vtkIndent indent)
#define vtkSetMacro(name, type)
Definition: vtkSetGet.h:69