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 =========================================================================*/
45 #ifndef vtkSelectionSource_h
46 #define vtkSelectionSource_h
47 
48 #include "vtkFiltersSourcesModule.h" // For export macro
49 #include "vtkSelectionAlgorithm.h"
50 
51 class VTKFILTERSSOURCES_EXPORT vtkSelectionSource : public vtkSelectionAlgorithm
52 {
53 public:
56  void PrintSelf(ostream& os, vtkIndent indent) override;
57 
59 
64  void AddID(vtkIdType piece, vtkIdType id);
65  void AddStringID(vtkIdType piece, const char* id);
67 
71  void AddLocation(double x, double y, double z);
72 
76  void AddThreshold(double min, double max);
77 
81  void SetFrustum(double* vertices);
82 
86  void AddBlock(vtkIdType blockno);
87 
89 
93  void AddBlockSelector(const char* selector);
96 
98 
101  void RemoveAllIDs();
104 
109 
114 
119 
121 
126  vtkSetMacro(ContentType, int);
127  vtkGetMacro(ContentType, int);
129 
131 
136  vtkSetMacro(FieldType, int);
137  vtkGetMacro(FieldType, int);
139 
141 
145  vtkSetMacro(ContainingCells, int);
146  vtkGetMacro(ContainingCells, int);
148 
150 
153  vtkSetClampMacro(NumberOfLayers, int, 0, VTK_INT_MAX);
154  vtkGetMacro(NumberOfLayers, int);
156 
158 
162  vtkSetMacro(Inverse, int);
163  vtkGetMacro(Inverse, int);
165 
167 
171  vtkSetStringMacro(ArrayName);
172  vtkGetStringMacro(ArrayName);
174 
176 
180  vtkSetMacro(ArrayComponent, int);
181  vtkGetMacro(ArrayComponent, int);
183 
185 
188  vtkSetMacro(CompositeIndex, int);
189  vtkGetMacro(CompositeIndex, int);
191 
193 
197  vtkSetMacro(HierarchicalLevel, int);
198  vtkGetMacro(HierarchicalLevel, int);
199  vtkSetMacro(HierarchicalIndex, int);
200  vtkGetMacro(HierarchicalIndex, int);
202 
204 
209  vtkSetStringMacro(AssemblyName);
210  vtkGetStringMacro(AssemblyName);
211  void AddSelector(const char* selector);
214 
216 
219  vtkSetStringMacro(QueryString);
220  vtkGetStringMacro(QueryString);
222 
223 protected:
226 
228  vtkInformationVector* outputVector) override;
229  int RequestData(vtkInformation* request, vtkInformationVector** inputVector,
230  vtkInformationVector* outputVector) override;
231 
236  int Inverse;
240  char* ArrayName;
242  char* QueryString;
245 
246 private:
247  vtkSelectionSource(const vtkSelectionSource&) = delete;
248  void operator=(const vtkSelectionSource&) = delete;
249 
250  class vtkInternals;
251  vtkInternals* Internal;
252 };
253 
254 #endif
vtkSelectionSource::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
VTK_INT_MAX
#define VTK_INT_MAX
Definition: vtkType.h:155
vtkSelectionSource::AddStringID
void AddStringID(vtkIdType piece, const char *id)
Add a (piece, id) to the selection set.
vtkSelectionSource::SetFrustum
void SetFrustum(double *vertices)
Set a frustum to choose within.
vtkSelectionSource::RemoveAllStringIDs
void RemoveAllStringIDs()
Removes all IDs.
vtkSelectionSource::HierarchicalIndex
int HierarchicalIndex
Definition: vtkSelectionSource.h:239
vtkIdType
int vtkIdType
Definition: vtkType.h:332
vtkSelectionSource::AddLocation
void AddLocation(double x, double y, double z)
Add a point in world space to probe at.
vtkSelectionSource::Inverse
int Inverse
Definition: vtkSelectionSource.h:236
vtkInformationVector
Store zero or more vtkInformation instances.
Definition: vtkInformationVector.h:145
vtkSelectionSource::ArrayName
char * ArrayName
Definition: vtkSelectionSource.h:240
vtkSelectionSource::RequestData
int RequestData(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector) override
This is called by the superclass.
vtkSelectionSource::NumberOfLayers
int NumberOfLayers
Definition: vtkSelectionSource.h:243
vtkSelectionSource::FieldType
int FieldType
Definition: vtkSelectionSource.h:233
vtkSelectionSource::New
static vtkSelectionSource * New()
vtkSelectionSource::AddSelector
void AddSelector(const char *selector)
For selector-based selection qualification.
vtkSelectionSource::AssemblyName
char * AssemblyName
Definition: vtkSelectionSource.h:244
vtkSelectionSource::AddBlockSelector
void AddBlockSelector(const char *selector)
Add/Remove block-selectors to make selections with vtkSelectionNode::BLOCK_SELECTORS as the content-t...
vtkSelectionSource::RemoveAllIDs
void RemoveAllIDs()
Removes all IDs.
vtkSelectionAlgorithm.h
vtkSelectionSource::CompositeIndex
int CompositeIndex
Definition: vtkSelectionSource.h:237
max
#define max(a, b)
Definition: vtkX3DExporterFIWriterHelper.h:31
vtkSelectionSource::RemoveAllBlocks
void RemoveAllBlocks()
Remove all blocks added with AddBlock.
vtkSelectionSource::ArrayComponent
int ArrayComponent
Definition: vtkSelectionSource.h:241
vtkSelectionSource::AddThreshold
void AddThreshold(double min, double max)
Add a value range to threshold within.
vtkSelectionSource::QueryString
char * QueryString
Definition: vtkSelectionSource.h:242
vtkSelectionSource::~vtkSelectionSource
~vtkSelectionSource() override
vtkIndent
a simple class to control print indentation
Definition: vtkIndent.h:113
vtkSelectionSource::RequestInformation
int RequestInformation(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector) override
vtkSelectionSource
Generate selection from given set of ids vtkSelectionSource generates a vtkSelection from a set of (p...
Definition: vtkSelectionSource.h:52
vtkSelectionSource::AddID
void AddID(vtkIdType piece, vtkIdType id)
Add a (piece, id) to the selection set.
vtkSelectionSource::PreserveTopology
int PreserveTopology
Definition: vtkSelectionSource.h:235
vtkSelectionSource::AddBlock
void AddBlock(vtkIdType blockno)
Add the flat-index/composite index for a block.
vtkInformation
Store vtkAlgorithm input/output information.
Definition: vtkInformation.h:183
vtkSelectionSource::RemoveAllSelectors
void RemoveAllSelectors()
For selector-based selection qualification.
vtkSelectionSource::ContainingCells
int ContainingCells
Definition: vtkSelectionSource.h:234
vtkSelectionSource::ContentType
int ContentType
Definition: vtkSelectionSource.h:232
vtkSelectionSource::RemoveAllThresholds
void RemoveAllThresholds()
Remove all thresholds added with AddThreshold.
vtkSelectionSource::HierarchicalLevel
int HierarchicalLevel
Definition: vtkSelectionSource.h:238
vtkSelectionAlgorithm
Superclass for algorithms that produce only Selection as output.
Definition: vtkSelectionAlgorithm.h:47
vtkSelectionSource::RemoveAllLocations
void RemoveAllLocations()
Remove all locations added with AddLocation.
vertices
std::pair< boost::graph_traits< vtkGraph * >::vertex_iterator, boost::graph_traits< vtkGraph * >::vertex_iterator > vertices(vtkGraph *g)
Definition: vtkBoostGraphAdapter.h:1012
vtkSelectionSource::vtkSelectionSource
vtkSelectionSource()
vtkSelectionSource::RemoveAllBlockSelectors
void RemoveAllBlockSelectors()
Add/Remove block-selectors to make selections with vtkSelectionNode::BLOCK_SELECTORS as the content-t...