VTK  9.2.6
vtkDataSetSurfaceFilter.h
Go to the documentation of this file.
1/*=========================================================================
2
3 Program: Visualization Toolkit
4 Module: vtkDataSetSurfaceFilter.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=========================================================================*/
90
91#ifndef vtkDataSetSurfaceFilter_h
92#define vtkDataSetSurfaceFilter_h
93
94#include "vtkFiltersGeometryModule.h" // For export macro
95#include "vtkGeometryFilter.h" // To facilitate delegation
97
98template <typename ArrayType>
99class vtkSmartPointer;
100
101class vtkCellIterator;
102class vtkPointData;
103class vtkPoints;
104class vtkIdTypeArray;
105class vtkImageData;
109
110// Helper structure for hashing faces.
119
120class VTKFILTERSGEOMETRY_EXPORT vtkDataSetSurfaceFilter : public vtkPolyDataAlgorithm
121{
122public:
124
129 void PrintSelf(ostream& os, vtkIndent indent) override;
130
132
136 VTK_DEPRECATED_IN_9_1_0("no longer supported")
138
139 VTK_DEPRECATED_IN_9_1_0("no longer supported")
141
142 VTK_DEPRECATED_IN_9_1_0("no longer supported")
144
145 VTK_DEPRECATED_IN_9_1_0("no longer supported")
148
150
155 vtkSetMacro(PieceInvariant, int);
156 vtkGetMacro(PieceInvariant, int);
158
160
173
175
181 vtkSetMacro(FastMode, bool);
182 vtkGetMacro(FastMode, bool);
183 vtkBooleanMacro(FastMode, bool);
185
187
193 vtkSetStringMacro(OriginalCellIdsName);
194 virtual const char* GetOriginalCellIdsName()
195 {
196 return (this->OriginalCellIdsName ? this->OriginalCellIdsName : "vtkOriginalCellIds");
197 }
198 vtkSetStringMacro(OriginalPointIdsName);
199 virtual const char* GetOriginalPointIdsName()
200 {
201 return (this->OriginalPointIdsName ? this->OriginalPointIdsName : "vtkOriginalPointIds");
202 }
203
204
206
217 vtkSetMacro(NonlinearSubdivisionLevel, int);
218 vtkGetMacro(NonlinearSubdivisionLevel, int);
220
222
227 vtkSetMacro(Delegation, vtkTypeBool);
228 vtkGetMacro(Delegation, vtkTypeBool);
229 vtkBooleanMacro(Delegation, vtkTypeBool);
231
233
237 virtual int StructuredExecute(
238 vtkDataSet* input, vtkPolyData* output, vtkIdType* ext, vtkIdType* wholeExt);
239#ifdef VTK_USE_64BIT_IDS
240 virtual int StructuredExecute(
241 vtkDataSet* input, vtkPolyData* output, const int* ext32, const int* wholeExt32)
242 {
243 vtkIdType ext[6];
244 vtkIdType wholeExt[6];
245 for (int cc = 0; cc < 6; cc++)
246 {
247 ext[cc] = ext32[cc];
248 wholeExt[cc] = wholeExt32[cc];
249 }
250 return this->StructuredExecute(input, output, ext, wholeExt);
251 }
252#endif
253
262 virtual int UnstructuredGridExecute(vtkDataSet* input, vtkPolyData* output);
264
268 virtual int DataSetExecute(vtkDataSet* input, vtkPolyData* output);
269 virtual int UniformGridExecute(vtkDataSet* input, vtkPolyData* output, vtkIdType* ext,
270 vtkIdType* wholeExt, bool extractface[6]);
272
278 vtkDataSet* input, vtkPolyData* output, vtkGeometryFilterHelper* info);
279#ifdef VTK_USE_64BIT_IDS
280 virtual int UniformGridExecute(vtkDataSet* input, vtkPolyData* output, const int* ext32,
281 const int* wholeExt32, bool extractface[6])
282 {
283 vtkIdType ext[6];
284 vtkIdType wholeExt[6];
285 for (int cc = 0; cc < 6; cc++)
286 {
287 ext[cc] = ext32[cc];
288 wholeExt[cc] = wholeExt32[cc];
289 }
290 return this->UniformGridExecute(input, output, ext, wholeExt, extractface);
291 }
292#endif
294
295protected:
298
300
302 int FillInputPortInformation(int port, vtkInformation* info) override;
303
304 // Helper methods.
305
314 vtkIdType* ext, vtkIdType* wholeExt, vtkIdType& numPoints, vtkIdType& numCells);
315
316 void ExecuteFaceQuads(vtkDataSet* input, vtkPolyData* output, int maxFlag, vtkIdType* ext,
317 int aAxis, int bAxis, int cAxis, vtkIdType* wholeExt, bool checkVisibility);
318
319 void ExecuteFaceQuads(vtkDataSet* input, vtkPolyData* output, int maxFlag, vtkIdType* ext,
320 int aAxis, int bAxis, int cAxis, vtkIdType* wholeExt);
321
324 virtual void InsertQuadInHash(
325 vtkIdType a, vtkIdType b, vtkIdType c, vtkIdType d, vtkIdType sourceId);
326 virtual void InsertTriInHash(
327 vtkIdType a, vtkIdType b, vtkIdType c, vtkIdType sourceId, vtkIdType faceId = -1);
328 virtual void InsertPolygonInHash(const vtkIdType* ids, int numpts, vtkIdType sourceId);
331
336
339 vtkIdType inPtId, vtkDataSet* input, vtkPoints* outPts, vtkPointData* outPD);
341 double* weights, vtkPoints* outPts, vtkPointData* outPD);
342
343 class vtkEdgeInterpolationMap;
344
345 vtkEdgeInterpolationMap* EdgeMap;
347 "Use GetInterpolatedPointId(vtkIdType edgePtA, vtkIdType edgePtB, vtkDataSet* input, vtkCell* "
348 "cell, double pcoords[3], double* weights, vtkPoints* outPts, vtkPointData* outPD) instead")
350 vtkCell* cell, double pcoords[3], vtkPoints* outPts, vtkPointData* outPD);
352 vtkCell* cell, double pcoords[3], double* weights, vtkPoints* outPts, vtkPointData* outPD);
353 vtkIdType GetInterpolatedPointId(vtkDataSet* input, vtkCell* cell, double pcoords[3],
354 double* weights, vtkPoints* outPts, vtkPointData* outPD);
356
357 // Better memory allocation for faces (hash)
361 // -----
364 unsigned char** FastGeomQuadArrays; // store this data as an array of bytes
365 // These indexes allow us to find the next available face.
368
370
372 void RecordOrigCellId(vtkIdType newIndex, vtkIdType origId);
373 virtual void RecordOrigCellId(vtkIdType newIndex, vtkFastGeomQuad* quad);
376
378 void RecordOrigPointId(vtkIdType newIndex, vtkIdType origId);
381
385
386private:
387 int UnstructuredGridBaseExecute(vtkDataSet* input, vtkPolyData* output);
388 int UnstructuredGridExecuteInternal(vtkUnstructuredGridBase* input, vtkPolyData* output,
389 bool handleSubdivision, vtkSmartPointer<vtkCellIterator> cellIter);
390
391 int StructuredExecuteNoBlanking(
392 vtkDataSet* input, vtkPolyData* output, vtkIdType* ext, vtkIdType* wholeExt);
393
395 void operator=(const vtkDataSetSurfaceFilter&) = delete;
396};
397
398#endif
Efficient cell iterator for vtkDataSet topologies.
abstract class to specify cell behavior
Definition vtkCell.h:61
void UseStripsOn()
Statndard methods for object instantiation, type information, and printing.
static vtkDataSetSurfaceFilter * New()
Statndard methods for object instantiation, type information, and printing.
vtkFastGeomQuad * NewFastGeomQuad(int numPts)
vtkIdType GetOutputPointId(vtkIdType inPtId, vtkDataSet *input, vtkPoints *outPts, vtkPointData *outPD)
void PrintSelf(ostream &os, vtkIndent indent) override
Statndard methods for object instantiation, type information, and printing.
void ExecuteFaceQuads(vtkDataSet *input, vtkPolyData *output, int maxFlag, vtkIdType *ext, int aAxis, int bAxis, int cAxis, vtkIdType *wholeExt)
int UnstructuredGridExecute(vtkDataSet *input, vtkPolyData *output, vtkGeometryFilterHelper *info)
Optimized UnstructuredGridExecute function for vtkUnstructuredGrid and subclass instances only.
virtual int DataSetExecute(vtkDataSet *input, vtkPolyData *output)
Execute the filter on input and store the result in output.
vtkTypeBool GetUseStrips()
Triangle strip support was dropped in 9.1.
virtual void InsertPolygonInHash(const vtkIdType *ids, int numpts, vtkIdType sourceId)
void ExecuteFaceQuads(vtkDataSet *input, vtkPolyData *output, int maxFlag, vtkIdType *ext, int aAxis, int bAxis, int cAxis, vtkIdType *wholeExt, bool checkVisibility)
virtual int UniformGridExecute(vtkDataSet *input, vtkPolyData *output, vtkIdType *ext, vtkIdType *wholeExt, bool extractface[6])
Direct access methods so that this class can be used as an algorithm without using it as a filter (i....
~vtkDataSetSurfaceFilter() override
int RequestUpdateExtent(vtkInformation *, vtkInformationVector **, vtkInformationVector *) override
This is called by the superclass.
void EstimateStructuredDataArraySizes(vtkIdType *ext, vtkIdType *wholeExt, vtkIdType &numPoints, vtkIdType &numCells)
Estimates the total number of points & cells on the surface to render ext – the extent of the structu...
virtual const char * GetOriginalCellIdsName()
If PassThroughCellIds or PassThroughPointIds is on, then these ivars control the name given to the fi...
virtual int StructuredExecute(vtkDataSet *input, vtkPolyData *output, vtkIdType *ext, vtkIdType *wholeExt)
Direct access methods so that this class can be used as an algorithm without using it as a filter (i....
virtual int UnstructuredGridExecute(vtkDataSet *input, vtkPolyData *output)
Execute the filter on input and store the result in output.
virtual const char * GetOriginalPointIdsName()
If PassThroughCellIds or PassThroughPointIds is on, then these ivars control the name given to the fi...
void UseStripsOff()
Statndard methods for object instantiation, type information, and printing.
vtkIdType GetOutputPointIdAndInterpolate(vtkIdType inPtId, vtkDataSet *input, vtkCell *cell, double *weights, vtkPoints *outPts, vtkPointData *outPD)
void SetUseStrips(vtkTypeBool)
Statndard methods for object instantiation, type information, and printing.
vtkEdgeInterpolationMap * EdgeMap
void InitFastGeomQuadAllocation(vtkIdType numberOfCells)
vtkFastGeomQuad * GetNextVisibleQuadFromHash()
void RecordOrigPointId(vtkIdType newIndex, vtkIdType origId)
void RecordOrigCellId(vtkIdType newIndex, vtkIdType origId)
vtkIdType GetInterpolatedPointId(vtkIdType edgePtA, vtkIdType edgePtB, vtkDataSet *input, vtkCell *cell, double pcoords[3], vtkPoints *outPts, vtkPointData *outPD)
int FillInputPortInformation(int port, vtkInformation *info) override
Fill the input port information objects for this algorithm.
virtual void InsertQuadInHash(vtkIdType a, vtkIdType b, vtkIdType c, vtkIdType d, vtkIdType sourceId)
int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *) override
This is called by the superclass.
virtual void InsertTriInHash(vtkIdType a, vtkIdType b, vtkIdType c, vtkIdType sourceId, vtkIdType faceId=-1)
void InitializeQuadHash(vtkIdType numPoints)
abstract class to specify dataset behavior
Definition vtkDataSet.h:63
dynamic, self-adjusting array of vtkIdType
topologically and geometrically regular array of data
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 point attribute data
represent and manipulate 3D points
Definition vtkPoints.h:40
concrete dataset represents vertices, lines, polygons, and triangle strips
Definition vtkPolyData.h:91
a dataset that is topologically regular with variable spacing in the three coordinate directions
Hold a reference to a vtkObjectBase instance.
topologically regular array of data
dataset represents arbitrary combinations of all possible cell types.
struct vtkFastGeomQuadStruct * Next
int vtkTypeBool
Definition vtkABI.h:69
struct vtkFastGeomQuadStruct vtkFastGeomQuad
#define VTK_DEPRECATED_IN_9_1_0(reason)
int vtkIdType
Definition vtkType.h:332