VTK
vtkSelectPolyData.h
Go to the documentation of this file.
1/*=========================================================================
2
3 Program: Visualization Toolkit
4 Module: vtkSelectPolyData.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=========================================================================*/
81#ifndef vtkSelectPolyData_h
82#define vtkSelectPolyData_h
83
84#include "vtkFiltersModelingModule.h" // For export macro
86
87#define VTK_INSIDE_SMALLEST_REGION 0
88#define VTK_INSIDE_LARGEST_REGION 1
89#define VTK_INSIDE_CLOSEST_POINT_REGION 2
90
91class vtkCharArray;
92class vtkPoints;
93class vtkIdList;
94
95class VTKFILTERSMODELING_EXPORT vtkSelectPolyData : public vtkPolyDataAlgorithm
96{
97public:
104
106 void PrintSelf(ostream& os, vtkIndent indent);
107
109
116 vtkSetMacro(GenerateSelectionScalars,int);
117 vtkGetMacro(GenerateSelectionScalars,int);
118 vtkBooleanMacro(GenerateSelectionScalars,int);
120
122
126 vtkSetMacro(InsideOut,int);
127 vtkGetMacro(InsideOut,int);
128 vtkBooleanMacro(InsideOut,int);
130
132
136 virtual void SetLoop(vtkPoints*);
137 vtkGetObjectMacro(Loop,vtkPoints);
139
141
144 vtkSetVector3Macro(ClosestPoint,double);
145 vtkGetVector3Macro(ClosestPoint,double);
147
149
152 vtkSetClampMacro(SelectionMode,int,
154 vtkGetMacro(SelectionMode,int);
156 {this->SetSelectionMode(VTK_INSIDE_SMALLEST_REGION);};
158 {this->SetSelectionMode(VTK_INSIDE_LARGEST_REGION);};
160 {this->SetSelectionMode(VTK_INSIDE_CLOSEST_POINT_REGION);};
161 const char *GetSelectionModeAsString();
163
165
169 vtkSetMacro(GenerateUnselectedOutput,int);
170 vtkGetMacro(GenerateUnselectedOutput,int);
171 vtkBooleanMacro(GenerateUnselectedOutput,int);
173
179
184
185 // Overload GetMTime() because we depend on Loop
187
188protected:
191
193
198 double ClosestPoint[3];
200
201private:
202 vtkPolyData *Mesh;
203 void GetPointNeighbors (vtkIdType ptId, vtkIdList *nei);
204private:
205 vtkSelectPolyData(const vtkSelectPolyData&) VTK_DELETE_FUNCTION;
206 void operator=(const vtkSelectPolyData&) VTK_DELETE_FUNCTION;
207};
208
210
214{
216 {
217 return "InsideSmallestRegion";
218 }
219 else if ( this->SelectionMode == VTK_INSIDE_LARGEST_REGION )
220 {
221 return "InsideLargestRegion";
222 }
223 else
224 {
225 return "InsideClosestPointRegion";
226 }
227}
229
230#endif
231
232
dynamic, self-adjusting array of char
Definition: vtkCharArray.h:39
list of point or cell ids
Definition: vtkIdList.h:37
a simple class to control print indentation
Definition: vtkIndent.h:40
Store zero or more vtkInformation instances.
Store vtkAlgorithm input/output information.
represent and manipulate 3D points
Definition: vtkPoints.h:40
Superclass for algorithms that produce only polydata as output.
concrete dataset represents vertices, lines, polygons, and triangle strips
Definition: vtkPolyData.h:86
select portion of polygonal mesh; generate selection scalars
virtual void SetLoop(vtkPoints *)
Set/Get the array of point coordinates defining the loop.
vtkPolyData * GetSelectionEdges()
Return the (mesh) edges of the selection region.
vtkMTimeType GetMTime()
Return this object's modified time.
void SetSelectionModeToSmallestRegion()
static vtkSelectPolyData * New()
Instantiate object with InsideOut turned off, and GenerateSelectionScalars turned off.
void SetSelectionModeToLargestRegion()
const char * GetSelectionModeAsString()
Return the method of determining in/out of loop as a string.
void SetSelectionModeToClosestPointRegion()
int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *)
This is called by the superclass.
vtkPolyData * GetUnselectedOutput()
Return output that hasn't been selected (if GenreateUnselectedOutput is enabled).
void PrintSelf(ostream &os, vtkIndent indent)
Methods invoked by print to print information about the object including superclasses.
vtkSetMacro(IgnoreDriverBugs, bool)
Updates the extensions string.
vtkBooleanMacro(IgnoreDriverBugs, bool)
Updates the extensions string.
#define VTK_INSIDE_SMALLEST_REGION
#define VTK_INSIDE_LARGEST_REGION
#define VTK_INSIDE_CLOSEST_POINT_REGION
int vtkIdType
Definition: vtkType.h:287
vtkTypeUInt64 vtkMTimeType
Definition: vtkType.h:248