VTK  9.1.0
vtkSelectionSource.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkSelectionSource.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 =========================================================================*/
26 #ifndef vtkSelectionSource_h
27 #define vtkSelectionSource_h
28 
29 #include "vtkFiltersSourcesModule.h" // For export macro
30 #include "vtkSelectionAlgorithm.h"
31 
32 class VTKFILTERSSOURCES_EXPORT vtkSelectionSource : public vtkSelectionAlgorithm
33 {
34 public:
37  void PrintSelf(ostream& os, vtkIndent indent) override;
38 
40 
45  void AddID(vtkIdType piece, vtkIdType id);
46  void AddStringID(vtkIdType piece, const char* id);
48 
52  void AddLocation(double x, double y, double z);
53 
57  void AddThreshold(double min, double max);
58 
62  void SetFrustum(double* vertices);
63 
67  void AddBlock(vtkIdType blockno);
68 
70 
74  void AddBlockSelector(const char* selector);
77 
79 
82  void RemoveAllIDs();
85 
90 
95 
100 
102 
107  vtkSetMacro(ContentType, int);
108  vtkGetMacro(ContentType, int);
110 
112 
117  vtkSetMacro(FieldType, int);
118  vtkGetMacro(FieldType, int);
120 
122 
126  vtkSetMacro(ContainingCells, int);
127  vtkGetMacro(ContainingCells, int);
129 
131 
134  vtkSetClampMacro(NumberOfLayers, int, 0, VTK_INT_MAX);
135  vtkGetMacro(NumberOfLayers, int);
137 
139 
143  vtkSetMacro(Inverse, int);
144  vtkGetMacro(Inverse, int);
146 
148 
152  vtkSetStringMacro(ArrayName);
153  vtkGetStringMacro(ArrayName);
155 
157 
161  vtkSetMacro(ArrayComponent, int);
162  vtkGetMacro(ArrayComponent, int);
164 
166 
169  vtkSetMacro(CompositeIndex, int);
170  vtkGetMacro(CompositeIndex, int);
172 
174 
178  vtkSetMacro(HierarchicalLevel, int);
179  vtkGetMacro(HierarchicalLevel, int);
180  vtkSetMacro(HierarchicalIndex, int);
181  vtkGetMacro(HierarchicalIndex, int);
183 
185 
190  vtkSetStringMacro(AssemblyName);
191  vtkGetStringMacro(AssemblyName);
192  void AddSelector(const char* selector);
195 
197 
200  vtkSetStringMacro(QueryString);
201  vtkGetStringMacro(QueryString);
203 
204 protected:
207 
209  vtkInformationVector* outputVector) override;
210  int RequestData(vtkInformation* request, vtkInformationVector** inputVector,
211  vtkInformationVector* outputVector) override;
212 
217  int Inverse;
221  char* ArrayName;
223  char* QueryString;
226 
227 private:
228  vtkSelectionSource(const vtkSelectionSource&) = delete;
229  void operator=(const vtkSelectionSource&) = delete;
230 
231  class vtkInternals;
232  vtkInternals* Internal;
233 };
234 
235 #endif
a simple class to control print indentation
Definition: vtkIndent.h:34
Store zero or more vtkInformation instances.
Store vtkAlgorithm input/output information.
Superclass for algorithms that produce only Selection as output.
Generate selection from given set of ids vtkSelectionSource generates a vtkSelection from a set of (p...
void RemoveAllThresholds()
Remove all thresholds added with AddThreshold.
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
void AddBlock(vtkIdType blockno)
Add the flat-index/composite index for a block.
static vtkSelectionSource * New()
void AddBlockSelector(const char *selector)
Add/Remove block-selectors to make selections with vtkSelectionNode::BLOCK_SELECTORS as the content-t...
void AddStringID(vtkIdType piece, const char *id)
Add a (piece, id) to the selection set.
void RemoveAllSelectors()
For selector-based selection qualification.
void SetFrustum(double *vertices)
Set a frustum to choose within.
void AddLocation(double x, double y, double z)
Add a point in world space to probe at.
void RemoveAllStringIDs()
Removes all IDs.
void RemoveAllLocations()
Remove all locations added with AddLocation.
void RemoveAllIDs()
Removes all IDs.
int RequestInformation(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector) override
~vtkSelectionSource() override
void AddSelector(const char *selector)
For selector-based selection qualification.
void RemoveAllBlocks()
Remove all blocks added with AddBlock.
void AddID(vtkIdType piece, vtkIdType id)
Add a (piece, id) to the selection set.
int RequestData(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector) override
This is called by the superclass.
void RemoveAllBlockSelectors()
Add/Remove block-selectors to make selections with vtkSelectionNode::BLOCK_SELECTORS as the content-t...
void AddThreshold(double min, double max)
Add a value range to threshold within.
std::pair< boost::graph_traits< vtkGraph * >::vertex_iterator, boost::graph_traits< vtkGraph * >::vertex_iterator > vertices(vtkGraph *g)
int vtkIdType
Definition: vtkType.h:332
#define VTK_INT_MAX
Definition: vtkType.h:155
#define max(a, b)