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=========================================================================*/
87#ifndef vtkSelectPolyData_h
88#define vtkSelectPolyData_h
89
90#include "vtkFiltersModelingModule.h" // For export macro
92
93#define VTK_INSIDE_SMALLEST_REGION 0
94#define VTK_INSIDE_LARGEST_REGION 1
95#define VTK_INSIDE_CLOSEST_POINT_REGION 2
96
97class vtkCharArray;
98class vtkPoints;
99class vtkIdList;
100
101class VTKFILTERSMODELING_EXPORT vtkSelectPolyData : public vtkPolyDataAlgorithm
102{
103public:
110
112 void PrintSelf(ostream& os, vtkIndent indent) override;
113
115
122 vtkSetMacro(GenerateSelectionScalars, vtkTypeBool);
123 vtkGetMacro(GenerateSelectionScalars, vtkTypeBool);
124 vtkBooleanMacro(GenerateSelectionScalars, vtkTypeBool);
126
128
132 vtkSetMacro(InsideOut, vtkTypeBool);
133 vtkGetMacro(InsideOut, vtkTypeBool);
134 vtkBooleanMacro(InsideOut, vtkTypeBool);
136
138
142 virtual void SetLoop(vtkPoints*);
143 vtkGetObjectMacro(Loop, vtkPoints);
145
147
150 vtkSetVector3Macro(ClosestPoint, double);
151 vtkGetVector3Macro(ClosestPoint, double);
153
155
158 vtkSetClampMacro(SelectionMode, int, VTK_INSIDE_SMALLEST_REGION, VTK_INSIDE_CLOSEST_POINT_REGION);
159 vtkGetMacro(SelectionMode, int);
163 {
164 this->SetSelectionMode(VTK_INSIDE_CLOSEST_POINT_REGION);
165 }
166 const char* GetSelectionModeAsString();
168
170
174 vtkSetMacro(GenerateUnselectedOutput, vtkTypeBool);
175 vtkGetMacro(GenerateUnselectedOutput, vtkTypeBool);
176 vtkBooleanMacro(GenerateUnselectedOutput, vtkTypeBool);
178
184
189
190 // Overload GetMTime() because we depend on Loop
192
193protected:
196
198
203 double ClosestPoint[3];
205
206private:
207 vtkPolyData* Mesh;
208 void GetPointNeighbors(vtkIdType ptId, vtkIdList* nei);
209
210private:
211 vtkSelectPolyData(const vtkSelectPolyData&) = delete;
212 void operator=(const vtkSelectPolyData&) = delete;
213};
214
219{
221 {
222 return "InsideSmallestRegion";
223 }
225 {
226 return "InsideLargestRegion";
227 }
228 else
229 {
230 return "InsideClosestPointRegion";
231 }
232}
233
234#endif
dynamic, self-adjusting array of char
Definition: vtkCharArray.h:58
list of point or cell ids
Definition: vtkIdList.h:40
a simple class to control print indentation
Definition: vtkIndent.h:43
Store zero or more vtkInformation instances.
Store vtkAlgorithm input/output information.
represent and manipulate 3D points
Definition: vtkPoints.h:43
Superclass for algorithms that produce only polydata as output.
concrete dataset represents vertices, lines, polygons, and triangle strips
Definition: vtkPolyData.h:95
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