VTK  9.1.0
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=========================================================================*/
78#ifndef vtkSelectPolyData_h
79#define vtkSelectPolyData_h
80
81#include "vtkFiltersModelingModule.h" // For export macro
83
84#define VTK_INSIDE_SMALLEST_REGION 0
85#define VTK_INSIDE_LARGEST_REGION 1
86#define VTK_INSIDE_CLOSEST_POINT_REGION 2
87
88class vtkCharArray;
89class vtkPoints;
90class vtkIdList;
91
92class VTKFILTERSMODELING_EXPORT vtkSelectPolyData : public vtkPolyDataAlgorithm
93{
94public:
101
103 void PrintSelf(ostream& os, vtkIndent indent) override;
104
106
113 vtkSetMacro(GenerateSelectionScalars, vtkTypeBool);
114 vtkGetMacro(GenerateSelectionScalars, vtkTypeBool);
115 vtkBooleanMacro(GenerateSelectionScalars, vtkTypeBool);
117
119
123 vtkSetMacro(InsideOut, vtkTypeBool);
124 vtkGetMacro(InsideOut, vtkTypeBool);
125 vtkBooleanMacro(InsideOut, vtkTypeBool);
127
129
133 virtual void SetLoop(vtkPoints*);
134 vtkGetObjectMacro(Loop, vtkPoints);
136
138
141 vtkSetVector3Macro(ClosestPoint, double);
142 vtkGetVector3Macro(ClosestPoint, double);
144
146
149 vtkSetClampMacro(SelectionMode, int, VTK_INSIDE_SMALLEST_REGION, VTK_INSIDE_CLOSEST_POINT_REGION);
150 vtkGetMacro(SelectionMode, int);
154 {
155 this->SetSelectionMode(VTK_INSIDE_CLOSEST_POINT_REGION);
156 }
157 const char* GetSelectionModeAsString();
159
161
165 vtkSetMacro(GenerateUnselectedOutput, vtkTypeBool);
166 vtkGetMacro(GenerateUnselectedOutput, vtkTypeBool);
167 vtkBooleanMacro(GenerateUnselectedOutput, vtkTypeBool);
169
175
180
181 // Overload GetMTime() because we depend on Loop
183
184protected:
187
189
194 double ClosestPoint[3];
196
197private:
198 vtkPolyData* Mesh;
199 void GetPointNeighbors(vtkIdType ptId, vtkIdList* nei);
200
201private:
202 vtkSelectPolyData(const vtkSelectPolyData&) = delete;
203 void operator=(const vtkSelectPolyData&) = delete;
204};
205
210{
212 {
213 return "InsideSmallestRegion";
214 }
216 {
217 return "InsideLargestRegion";
218 }
219 else
220 {
221 return "InsideClosestPointRegion";
222 }
223}
224
225#endif
dynamic, self-adjusting array of char
Definition: vtkCharArray.h:49
list of point or cell ids
Definition: vtkIdList.h:31
a simple class to control print indentation
Definition: vtkIndent.h:34
Store zero or more vtkInformation instances.
Store vtkAlgorithm input/output information.
represent and manipulate 3D points
Definition: vtkPoints.h:34
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.
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
void SetSelectionModeToSmallestRegion()
Control how inside/outside of loop is defined.
static vtkSelectPolyData * New()
Instantiate object with InsideOut turned off, and GenerateSelectionScalars turned off.
void SetSelectionModeToLargestRegion()
Control how inside/outside of loop is defined.
vtkTypeBool GenerateUnselectedOutput
int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *) override
This is called by the superclass.
const char * GetSelectionModeAsString()
Return the method of determining in/out of loop as a string.
vtkTypeBool GenerateSelectionScalars
void SetSelectionModeToClosestPointRegion()
Control how inside/outside of loop is defined.
vtkMTimeType GetMTime() override
Return this object's modified time.
~vtkSelectPolyData() override
vtkPolyData * GetUnselectedOutput()
Return output that hasn't been selected (if GenreateUnselectedOutput is enabled).
int vtkTypeBool
Definition: vtkABI.h:69
#define VTK_INSIDE_SMALLEST_REGION
#define VTK_INSIDE_LARGEST_REGION
#define VTK_INSIDE_CLOSEST_POINT_REGION
int vtkIdType
Definition: vtkType.h:332
vtkTypeUInt32 vtkMTimeType
Definition: vtkType.h:287