VTK  9.2.6
vtkExtractPolyDataGeometry.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkExtractPolyDataGeometry.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 =========================================================================*/
56 #ifndef vtkExtractPolyDataGeometry_h
57 #define vtkExtractPolyDataGeometry_h
58 
59 #include "vtkFiltersExtractionModule.h" // For export macro
60 #include "vtkPolyDataAlgorithm.h"
61 
63 
64 class VTKFILTERSEXTRACTION_EXPORT vtkExtractPolyDataGeometry : public vtkPolyDataAlgorithm
65 {
66 public:
68  void PrintSelf(ostream& os, vtkIndent indent) override;
69 
74 
78  vtkMTimeType GetMTime() override;
79 
81 
85  vtkGetObjectMacro(ImplicitFunction, vtkImplicitFunction);
87 
89 
94  vtkSetMacro(ExtractInside, vtkTypeBool);
95  vtkGetMacro(ExtractInside, vtkTypeBool);
96  vtkBooleanMacro(ExtractInside, vtkTypeBool);
98 
100 
104  vtkSetMacro(ExtractBoundaryCells, vtkTypeBool);
105  vtkGetMacro(ExtractBoundaryCells, vtkTypeBool);
106  vtkBooleanMacro(ExtractBoundaryCells, vtkTypeBool);
108 
110 
114  vtkSetMacro(PassPoints, vtkTypeBool);
115  vtkGetMacro(PassPoints, vtkTypeBool);
116  vtkBooleanMacro(PassPoints, vtkTypeBool);
118 
119 protected:
122 
123  // Usual data generation method
125 
130 
131  vtkIdType InsertPointInMap(vtkIdType i, vtkPoints* inPts, vtkPoints* newPts, vtkIdType* pointMap);
132 
133 private:
135  void operator=(const vtkExtractPolyDataGeometry&) = delete;
136 };
137 
139 
143  vtkIdType i, vtkPoints* inPts, vtkPoints* newPts, vtkIdType* pointMap)
144 {
145  double x[3];
146  inPts->GetPoint(i, x);
147  pointMap[i] = newPts->InsertNextPoint(x);
148  return pointMap[i];
149 }
151 
152 #endif
extract vtkPolyData cells that lies either entirely inside or outside of a specified implicit functio...
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
vtkExtractPolyDataGeometry(vtkImplicitFunction *f=nullptr)
vtkIdType InsertPointInMap(vtkIdType i, vtkPoints *inPts, vtkPoints *newPts, vtkIdType *pointMap)
When not passing points, have to use a point map to keep track of things.
int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *) override
This is called by the superclass.
~vtkExtractPolyDataGeometry() override
vtkMTimeType GetMTime() override
Return the MTime taking into account changes to the implicit function.
virtual void SetImplicitFunction(vtkImplicitFunction *)
Specify the implicit function for inside/outside checks.
static vtkExtractPolyDataGeometry * New()
Construct object with ExtractInside turned on.
abstract interface for implicit functions
a simple class to control print indentation
Definition: vtkIndent.h:49
Store zero or more vtkInformation instances.
Store vtkAlgorithm input/output information.
represent and manipulate 3D points
Definition: vtkPoints.h:49
vtkIdType InsertNextPoint(const float x[3])
Insert point into next available slot.
Definition: vtkPoints.h:220
double * GetPoint(vtkIdType id)
Return a pointer to a double point x[3] for a specific id.
Definition: vtkPoints.h:149
Superclass for algorithms that produce only polydata as output.
int vtkTypeBool
Definition: vtkABI.h:69
int vtkIdType
Definition: vtkType.h:332
vtkTypeUInt32 vtkMTimeType
Definition: vtkType.h:287