ParaView
vtkPVSelectionSource.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: ParaView
4  Module: vtkPVSelectionSource.h
5 
6  Copyright (c) Kitware, Inc.
7  All rights reserved.
8  See Copyright.txt or http://www.paraview.org/HTML/Copyright.html 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 =========================================================================*/
25 #ifndef vtkPVSelectionSource_h
26 #define vtkPVSelectionSource_h
27 
28 #include "vtkPVVTKExtensionsDefaultModule.h" //needed for exports
29 #include "vtkSelectionAlgorithm.h"
30 
31 class VTKPVVTKEXTENSIONSDEFAULT_EXPORT vtkPVSelectionSource : public vtkSelectionAlgorithm
32 {
33 public:
34  static vtkPVSelectionSource* New();
35  vtkTypeMacro(vtkPVSelectionSource, vtkSelectionAlgorithm);
36  void PrintSelf(ostream& os, vtkIndent indent);
37 
41  void SetFrustum(double vertices[32]);
42 
44 
47  void AddGlobalID(vtkIdType id);
48  void RemoveAllGlobalIDs();
50 
52 
55  void AddPedigreeID(const char* domain, vtkIdType id);
56  void RemoveAllPedigreeIDs();
58 
60 
63  void AddPedigreeStringID(const char* domain, const char* id);
64  void RemoveAllPedigreeStringIDs();
66 
68 
73  void AddID(vtkIdType piece, vtkIdType id);
74  void RemoveAllIDs();
76 
78 
85  void AddCompositeID(unsigned int composite_index, vtkIdType piece, vtkIdType id);
86  void RemoveAllCompositeIDs();
88 
90 
94  void AddHierarhicalID(unsigned int level, unsigned int dataset, vtkIdType id);
95  void RemoveAllHierarchicalIDs();
97 
99 
102  void AddThreshold(double min, double max);
103  void RemoveAllThresholds();
105 
107 
110  void AddBlock(vtkIdType blockno);
111  void RemoveAllBlocks();
113 
118  void SetArrayName(const char* arrayName);
119 
121 
124  void AddLocation(double x, double y, double z);
125  void RemoveAllLocations();
127 
129 
134  vtkSetMacro(FieldType, int);
135  vtkGetMacro(FieldType, int);
137 
139 
143  vtkSetMacro(ContainingCells, int);
144  vtkGetMacro(ContainingCells, int);
146 
148  vtkSetMacro(Inverse, int);
149  vtkGetMacro(Inverse, int);
151 
153 
156  vtkSetStringMacro(QueryString);
157  vtkGetStringMacro(QueryString);
159 
160 protected:
163 
164  virtual int RequestInformation(vtkInformation* request, vtkInformationVector** inputVector,
165  vtkInformationVector* outputVector);
166  virtual int RequestData(vtkInformation* request, vtkInformationVector** inputVector,
167  vtkInformationVector* outputVector);
168 
169  enum Modes
170  {
173  ID,
180  QUERY
181  };
182 
186  int Inverse;
187  double Frustum[32];
188  char* ArrayName;
189  char* QueryString;
190 
191 private:
192  vtkPVSelectionSource(const vtkPVSelectionSource&) VTK_DELETE_FUNCTION;
193  void operator=(const vtkPVSelectionSource&) VTK_DELETE_FUNCTION;
194 
195  class vtkInternal;
196  vtkInternal* Internal;
197 };
198 
199 #endif
selection source used to produce different types of vtkSelections.