VTK
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 =========================================================================*/
46 #ifndef vtkExtractPolyDataGeometry_h
47 #define vtkExtractPolyDataGeometry_h
48 
49 #include "vtkFiltersExtractionModule.h" // For export macro
50 #include "vtkPolyDataAlgorithm.h"
51 
53 
54 class VTKFILTERSEXTRACTION_EXPORT vtkExtractPolyDataGeometry : public vtkPolyDataAlgorithm
55 {
56 public:
58  void PrintSelf(ostream& os, vtkIndent indent);
59 
64 
69 
71 
75  vtkGetObjectMacro(ImplicitFunction,vtkImplicitFunction);
77 
79 
84  vtkSetMacro(ExtractInside,int);
85  vtkGetMacro(ExtractInside,int);
86  vtkBooleanMacro(ExtractInside,int);
88 
90 
94  vtkSetMacro(ExtractBoundaryCells,int);
95  vtkGetMacro(ExtractBoundaryCells,int);
96  vtkBooleanMacro(ExtractBoundaryCells,int);
98 
100 
104  vtkSetMacro(PassPoints,int);
105  vtkGetMacro(PassPoints,int);
106  vtkBooleanMacro(PassPoints,int);
108 
109 protected:
112 
113  // Usual data generation method
115 
120 
121  vtkIdType InsertPointInMap(vtkIdType i, vtkPoints *inPts, vtkPoints *newPts, vtkIdType *pointMap);
122 
123 private:
124  vtkExtractPolyDataGeometry(const vtkExtractPolyDataGeometry&) VTK_DELETE_FUNCTION;
125  void operator=(const vtkExtractPolyDataGeometry&) VTK_DELETE_FUNCTION;
126 };
127 
129 
133  vtkPoints *newPts, vtkIdType *pointMap)
134 {
135  double x[3];
136  inPts->GetPoint(i, x);
137  pointMap[i] = newPts->InsertNextPoint(x);
138  return pointMap[i];
139 }
141 
142 
143 #endif
extract vtkPolyData cells that lies either entirely inside or outside of a specified implicit functio...
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.
vtkExtractPolyDataGeometry(vtkImplicitFunction *f=NULL)
void PrintSelf(ostream &os, vtkIndent indent)
Methods invoked by print to print information about the object including superclasses.
virtual void SetImplicitFunction(vtkImplicitFunction *)
Specify the implicit function for inside/outside checks.
static vtkExtractPolyDataGeometry * New()
Construct object with ExtractInside turned on.
int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *)
This is called by the superclass.
vtkMTimeType GetMTime()
Return the MTime taking into account changes to the implicit function.
abstract interface for implicit functions
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
vtkIdType InsertNextPoint(const float x[3])
Insert point into next available slot.
Definition: vtkPoints.h:189
double * GetPoint(vtkIdType id)
Return a pointer to a double point x[3] for a specific id.
Definition: vtkPoints.h:140
Superclass for algorithms that produce only polydata as output.
vtkSetMacro(IgnoreDriverBugs, bool)
Updates the extensions string.
vtkBooleanMacro(IgnoreDriverBugs, bool)
Updates the extensions string.
int vtkIdType
Definition: vtkType.h:287
vtkTypeUInt64 vtkMTimeType
Definition: vtkType.h:248