VTK
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:
61  void PrintSelf(ostream& os, vtkIndent indent);
62 
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*);
94 
96 
97  void AddArrayName(const char*);
100 
102 
104  vtkSetMacro(MatchAnyValues, bool);
105  vtkGetMacro(MatchAnyValues, bool);
106  vtkBooleanMacro(MatchAnyValues, bool);
108 
110 
114 
116 
131  const char* arrayName);
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 
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 
202  vtkSelection* output);
203 
206  vtkDataSet* data,
207  vtkSelectionNode* output);
208 
210  vtkTable* selTable,
211  vtkTable* dataTable,
213 
216 
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
vtkgl::data
GLsizei GLsizei GLenum GLenum const GLvoid * data
Definition: vtkgl.h:11339
vtkGetObjectMacro
#define vtkGetObjectMacro(name, type)
Definition: vtkSetGet.h:232
vtkConvertSelection::GetSelectedRows
static void GetSelectedRows(vtkSelection *input, vtkTable *data, vtkIdTypeArray *indices)
vtkConvertSelection::ClearArrayNames
void ClearArrayNames()
vtkConvertSelection::GetSelectedEdges
static void GetSelectedEdges(vtkSelection *input, vtkGraph *data, vtkIdTypeArray *indices)
vtkConvertSelection::ArrayNames
vtkStringArray * ArrayNames
Definition: vtkConvertSelection.h:222
vtkSelectionNode
A node in a selection tree. Used to store selection results.
Definition: vtkSelectionNode.h:69
vtkConvertSelection::GetSelectedItems
static void GetSelectedItems(vtkSelection *input, vtkDataObject *data, int fieldType, vtkIdTypeArray *indices)
vtkConvertSelection::SetArrayName
virtual void SetArrayName(const char *)
vtkConvertSelection::vtkConvertSelection
vtkConvertSelection()
vtkConvertSelection::AddArrayName
void AddArrayName(const char *)
vtkConvertSelection::ConvertToBlockSelection
int ConvertToBlockSelection(vtkSelection *input, vtkCompositeDataSet *data, vtkSelection *output)
vtkConvertSelection::SetSelectionExtractor
virtual void SetSelectionExtractor(vtkExtractSelection *)
vtkInformationVector
Store zero or more vtkInformation instances.
Definition: vtkInformationVector.h:41
vtkTable
A table, which contains similar-typed columns of data.
Definition: vtkTable.h:68
vtkFiltersExtractionModule.h
vtkExtractSelection
extract a subset from a vtkDataSet.
Definition: vtkExtractSelection.h:50
vtkTypeMacro
#define vtkTypeMacro(thisClass, superclass)
Definition: vtkSetGet.h:642
vtkConvertSelection::SelectTableFromTable
int SelectTableFromTable(vtkTable *selTable, vtkTable *dataTable, vtkIdTypeArray *indices)
vtkConvertSelection::ToIndexSelection
static vtkSelection * ToIndexSelection(vtkSelection *input, vtkDataObject *data)
vtkConvertSelection::OutputType
int OutputType
Definition: vtkConvertSelection.h:220
vtkSelection
A node in a selection tree. Used to store selection results.
Definition: vtkSelection.h:45
vtkgl::input
GLenum GLenum GLenum input
Definition: vtkgl.h:15941
vtkConvertSelection::ToSelectionType
static vtkSelection * ToSelectionType(vtkSelection *input, vtkDataObject *data, int type, vtkStringArray *arrayNames=0, int inputFieldType=-1)
vtkgl::in
GLuint in
Definition: vtkgl.h:16905
vtkSelectionAlgorithm.h
vtkCompositeDataSet
abstract superclass for composite (multi-block or AMR) datasets
Definition: vtkCompositeDataSet.h:51
vtkConvertSelection::ConvertCompositeDataSet
int ConvertCompositeDataSet(vtkSelection *input, vtkCompositeDataSet *data, vtkSelection *output)
vtkConvertSelection::New
static vtkConvertSelection * New()
vtkConvertSelection::GetSelectedCells
static void GetSelectedCells(vtkSelection *input, vtkDataSet *data, vtkIdTypeArray *indices)
vtkX3D::port
@ port
Definition: vtkX3D.h:447
vtkConvertSelection::ToGlobalIdSelection
static vtkSelection * ToGlobalIdSelection(vtkSelection *input, vtkDataObject *data)
vtkConvertSelection::InputFieldType
int InputFieldType
Definition: vtkConvertSelection.h:221
vtkConvertSelection::ToPedigreeIdSelection
static vtkSelection * ToPedigreeIdSelection(vtkSelection *input, vtkDataObject *data)
vtkConvertSelection::ToValueSelection
static vtkSelection * ToValueSelection(vtkSelection *input, vtkDataObject *data, const char *arrayName)
vtkConvertSelection::MatchAnyValues
bool MatchAnyValues
Definition: vtkConvertSelection.h:223
vtkConvertSelection::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent)
vtkConvertSelection::SelectionExtractor
vtkExtractSelection * SelectionExtractor
Definition: vtkConvertSelection.h:224
vtkIndent
a simple class to control print indentation
Definition: vtkIndent.h:39
vtkgl::indices
GLuint GLuint GLsizei GLenum const GLvoid * indices
Definition: vtkgl.h:11315
vtkConvertSelection::GetSelectedPoints
static void GetSelectedPoints(vtkSelection *input, vtkDataSet *data, vtkIdTypeArray *indices)
vtkConvertSelection::RequestData
virtual int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *)
vtkGetMacro
#define vtkGetMacro(name, type)
Definition: vtkSetGet.h:93
vtkConvertSelection::Convert
int Convert(vtkSelection *input, vtkDataObject *data, vtkSelection *output)
vtkConvertSelection::SetDataObjectConnection
void SetDataObjectConnection(vtkAlgorithmOutput *in)
vtkDataSet
abstract class to specify dataset behavior
Definition: vtkDataSet.h:62
vtkBooleanMacro
vtkBooleanMacro(IgnoreDriverBugs, bool)
vtkInformation
Store vtkAlgorithm input/output information.
Definition: vtkInformation.h:86
vtkSetMacro
vtkSetMacro(IgnoreDriverBugs, bool)
vtkX3D::info
@ info
Definition: vtkX3D.h:376
vtkIdTypeArray
dynamic, self-adjusting array of vtkIdType
Definition: vtkIdTypeArray.h:49
VTKFILTERSEXTRACTION_EXPORT
#define VTKFILTERSEXTRACTION_EXPORT
Definition: vtkFiltersExtractionModule.h:15
vtkAlgorithmOutput
Proxy object to connect input/output ports.
Definition: vtkAlgorithmOutput.h:39
vtkConvertSelection::SetArrayNames
virtual void SetArrayNames(vtkStringArray *)
vtkConvertSelection::~vtkConvertSelection
~vtkConvertSelection()
vtkConvertSelection::ConvertToIndexSelection
int ConvertToIndexSelection(vtkSelectionNode *input, vtkDataSet *data, vtkSelectionNode *output)
vtkStringArray
a vtkAbstractArray subclass for strings
Definition: vtkStringArray.h:45
vtkSelectionAlgorithm
Superclass for algorithms that produce only Selection as output.
Definition: vtkSelectionAlgorithm.h:46
vtkConvertSelection::ToValueSelection
static vtkSelection * ToValueSelection(vtkSelection *input, vtkDataObject *data, vtkStringArray *arrayNames)
vtkGraph
Base class for graph data types.
Definition: vtkGraph.h:289
vtkDataObject
general representation of visualization data
Definition: vtkDataObject.h:65
vtkConvertSelection::GetArrayName
virtual const char * GetArrayName()
vtkConvertSelection
Convert a selection from one type to another.
Definition: vtkConvertSelection.h:57
vtkgl::type
GLuint GLuint GLsizei GLenum type
Definition: vtkgl.h:11315
vtkConvertSelection::GetSelectedVertices
static void GetSelectedVertices(vtkSelection *input, vtkGraph *data, vtkIdTypeArray *indices)
vtkConvertSelection::FillInputPortInformation
virtual int FillInputPortInformation(int port, vtkInformation *info)