VTK
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 =========================================================================*/
29 #ifndef vtkSelectionSource_h
30 #define vtkSelectionSource_h
31 
32 #include "vtkFiltersSourcesModule.h" // For export macro
33 #include "vtkSelectionAlgorithm.h"
34 
35 class vtkSelectionSourceInternals;
36 
37 class VTKFILTERSSOURCES_EXPORT vtkSelectionSource : public vtkSelectionAlgorithm
38 {
39 public:
42  void PrintSelf(ostream& os, vtkIndent indent) VTK_OVERRIDE;
43 
45 
50  void AddID(vtkIdType piece, vtkIdType id);
51  void AddStringID(vtkIdType piece, const char* id);
53 
57  void AddLocation(double x, double y, double z);
58 
62  void AddThreshold(double min, double max);
63 
67  void SetFrustum(double *vertices);
68 
72  void AddBlock(vtkIdType blockno);
73 
75 
78  void RemoveAllIDs();
81 
86 
91 
96 
98 
103  vtkSetMacro(ContentType, int);
104  vtkGetMacro(ContentType, int);
106 
108 
113  vtkSetMacro(FieldType, int);
114  vtkGetMacro(FieldType, int);
116 
118 
122  vtkSetMacro(ContainingCells, int);
123  vtkGetMacro(ContainingCells, int);
125 
127 
131  vtkSetMacro(Inverse, int);
132  vtkGetMacro(Inverse, int);
134 
136 
139  vtkSetStringMacro(ArrayName);
140  vtkGetStringMacro(ArrayName);
142 
144 
148  vtkSetMacro(ArrayComponent, int);
149  vtkGetMacro(ArrayComponent, int);
151 
153 
156  vtkSetMacro(CompositeIndex, int);
157  vtkGetMacro(CompositeIndex, int);
159 
161 
165  vtkSetMacro(HierarchicalLevel, int);
166  vtkGetMacro(HierarchicalLevel, int);
167  vtkSetMacro(HierarchicalIndex, int);
168  vtkGetMacro(HierarchicalIndex, int);
170 
172 
175  vtkSetStringMacro(QueryString);
176  vtkGetStringMacro(QueryString);
178 
179 protected:
181  ~vtkSelectionSource() VTK_OVERRIDE;
182 
183  int RequestInformation(vtkInformation* request,
184  vtkInformationVector** inputVector,
185  vtkInformationVector* outputVector) VTK_OVERRIDE;
186  int RequestData(vtkInformation* request,
187  vtkInformationVector** inputVector,
188  vtkInformationVector* outputVector) VTK_OVERRIDE;
189 
190  vtkSelectionSourceInternals* Internal;
191 
192  int ContentType;
193  int FieldType;
194  int ContainingCells;
195  int PreserveTopology;
196  int Inverse;
197  int CompositeIndex;
198  int HierarchicalLevel;
199  int HierarchicalIndex;
200  char *ArrayName;
201  int ArrayComponent;
202  char *QueryString;
203 
204 private:
205  vtkSelectionSource(const vtkSelectionSource&) VTK_DELETE_FUNCTION;
206  void operator=(const vtkSelectionSource&) VTK_DELETE_FUNCTION;
207 };
208 
209 #endif
vtkSelectionSource::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
vtkSelectionSource::AddStringID
void AddStringID(vtkIdType piece, const char *id)
vtkSelectionSource::SetFrustum
void SetFrustum(double *vertices)
Set a frustum to choose within.
vtkSelectionSource::RemoveAllStringIDs
void RemoveAllStringIDs()
vtkIdType
int vtkIdType
Definition: vtkType.h:287
vtkSelectionSource::AddLocation
void AddLocation(double x, double y, double z)
Add a point in world space to probe at.
vtkInformationVector
Store zero or more vtkInformation instances.
Definition: vtkInformationVector.h:42
vtkSelectionSource::New
static vtkSelectionSource * New()
vtkSelectionSource::RemoveAllIDs
void RemoveAllIDs()
Removes all IDs.
vtkSelectionAlgorithm.h
max
#define max(a, b)
Definition: vtkX3DExporterFIWriterHelper.h:31
vtkSelectionSource::RemoveAllBlocks
void RemoveAllBlocks()
Remove all blocks added with AddBlock.
vtkSelectionSource::AddThreshold
void AddThreshold(double min, double max)
Add a value range to threshold within.
vertices
std::pair< boost::graph_traits< vtkGraph * >::vertex_iterator, boost::graph_traits< vtkGraph * >::vertex_iterator > vertices(vtkGraph *g)
Definition: vtkBoostGraphAdapter.h:838
vtkSelectionSource::~vtkSelectionSource
~vtkSelectionSource() override
vtkIndent
a simple class to control print indentation
Definition: vtkIndent.h:40
vtkSelectionSource
Generate selection from given set of ids vtkSelectionSource generates a vtkSelection from a set of (p...
Definition: vtkSelectionSource.h:38
vtkGetStringMacro
vtkGetStringMacro(ExtensionsString)
Returns a string listing all available extensions.
vtkSelectionSource::AddID
void AddID(vtkIdType piece, vtkIdType id)
Add a (piece, id) to the selection set.
vtkSelectionSource::AddBlock
void AddBlock(vtkIdType blockno)
Add the flat-index/composite index for a block.
vtkInformation
Store vtkAlgorithm input/output information.
Definition: vtkInformation.h:87
vtkSetMacro
vtkSetMacro(IgnoreDriverBugs, bool)
Updates the extensions string.
vtkSelectionSource::RemoveAllThresholds
void RemoveAllThresholds()
Remove all thresholds added with AddThreshold.
vtkSelectionAlgorithm
Superclass for algorithms that produce only Selection as output.
Definition: vtkSelectionAlgorithm.h:47
vtkSelectionSource::RemoveAllLocations
void RemoveAllLocations()
Remove all locations added with AddLocation.
vtkSelectionSource::vtkSelectionSource
vtkSelectionSource()