VTK  9.0.1
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 =========================================================================*/
44 #ifndef vtkExtractPolyDataGeometry_h
45 #define vtkExtractPolyDataGeometry_h
46 
47 #include "vtkFiltersExtractionModule.h" // For export macro
48 #include "vtkPolyDataAlgorithm.h"
49 
51 
52 class VTKFILTERSEXTRACTION_EXPORT vtkExtractPolyDataGeometry : public vtkPolyDataAlgorithm
53 {
54 public:
56  void PrintSelf(ostream& os, vtkIndent indent) override;
57 
62 
66  vtkMTimeType GetMTime() override;
67 
69 
72  virtual void SetImplicitFunction(vtkImplicitFunction*);
73  vtkGetObjectMacro(ImplicitFunction, vtkImplicitFunction);
75 
77 
82  vtkSetMacro(ExtractInside, vtkTypeBool);
83  vtkGetMacro(ExtractInside, vtkTypeBool);
84  vtkBooleanMacro(ExtractInside, vtkTypeBool);
86 
88 
92  vtkSetMacro(ExtractBoundaryCells, vtkTypeBool);
93  vtkGetMacro(ExtractBoundaryCells, vtkTypeBool);
94  vtkBooleanMacro(ExtractBoundaryCells, vtkTypeBool);
96 
98 
102  vtkSetMacro(PassPoints, vtkTypeBool);
103  vtkGetMacro(PassPoints, vtkTypeBool);
104  vtkBooleanMacro(PassPoints, vtkTypeBool);
106 
107 protected:
109  ~vtkExtractPolyDataGeometry() override;
110 
111  // Usual data generation method
113 
118 
119  vtkIdType InsertPointInMap(vtkIdType i, vtkPoints* inPts, vtkPoints* newPts, vtkIdType* pointMap);
120 
121 private:
123  void operator=(const vtkExtractPolyDataGeometry&) = delete;
124 };
125 
127 
131  vtkIdType i, vtkPoints* inPts, vtkPoints* newPts, vtkIdType* pointMap)
132 {
133  double x[3];
134  inPts->GetPoint(i, x);
135  pointMap[i] = newPts->InsertNextPoint(x);
136  return pointMap[i];
137 }
139 
140 #endif
abstract interface for implicit functions
Store vtkAlgorithm input/output information.
vtkTypeUInt32 vtkMTimeType
Definition: vtkType.h:293
virtual int RequestData(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector)
This is called by the superclass.
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.
vtkIdType InsertNextPoint(const float x[3])
Insert point into next available slot.
Definition: vtkPoints.h:204
int vtkIdType
Definition: vtkType.h:338
static vtkPolyDataAlgorithm * New()
int vtkTypeBool
Definition: vtkABI.h:69
Superclass for algorithms that produce only polydata as output.
a simple class to control print indentation
Definition: vtkIndent.h:33
virtual vtkMTimeType GetMTime()
Return this object's modified time.
double * GetPoint(vtkIdType id)
Return a pointer to a double point x[3] for a specific id.
Definition: vtkPoints.h:133
Store zero or more vtkInformation instances.
extract vtkPolyData cells that lies either entirely inside or outside of a specified implicit functio...
represent and manipulate 3D points
Definition: vtkPoints.h:33
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.