VTK  9.2.6
vtkMergeCells.h
Go to the documentation of this file.
1/*=========================================================================
2
3 Program: Visualization Toolkit
4 Module: vtkMergeCells.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=========================================================================*/
15/*----------------------------------------------------------------------------
16 Copyright (c) Sandia Corporation
17 See Copyright.txt or http://www.paraview.org/HTML/Copyright.html for details.
18----------------------------------------------------------------------------*/
19
48#ifndef vtkMergeCells_h
49#define vtkMergeCells_h
50
51#include "vtkAlgorithm.h" // for vtkAlgorithm::DEFAULT_PRECISION
52#include "vtkDataSetAttributes.h" // Needed for FieldList
53#include "vtkFiltersGeneralModule.h" // For export macro
54#include "vtkObject.h"
55#include "vtkSmartPointer.h" //fot vtkSmartPointer
56
57class vtkCellData;
58class vtkDataSet;
59class vtkMergeCellsSTLCloak;
60class vtkMergePoints;
62class vtkPointData;
64
65class VTKFILTERSGENERAL_EXPORT vtkMergeCells : public vtkObject
66{
67public:
68 vtkTypeMacro(vtkMergeCells, vtkObject);
69 void PrintSelf(ostream& os, vtkIndent indent) override;
70
71 static vtkMergeCells* New();
72
74
80 vtkGetObjectMacro(UnstructuredGrid, vtkUnstructuredGrid);
82
84
88 vtkSetMacro(TotalNumberOfCells, vtkIdType);
89 vtkGetMacro(TotalNumberOfCells, vtkIdType);
91
93
98 vtkSetMacro(TotalNumberOfPoints, vtkIdType);
99 vtkGetMacro(TotalNumberOfPoints, vtkIdType);
101
103
109 vtkSetMacro(UseGlobalIds, int);
110 vtkGetMacro(UseGlobalIds, int);
111 vtkBooleanMacro(UseGlobalIds, int);
113
115
122 vtkSetClampMacro(PointMergeTolerance, double, 0.0, VTK_DOUBLE_MAX);
123 vtkGetMacro(PointMergeTolerance, double);
125
127
131 vtkSetMacro(UseGlobalCellIds, int);
132 vtkGetMacro(UseGlobalCellIds, int);
133 vtkBooleanMacro(UseGlobalCellIds, int);
135
137
142 vtkSetMacro(MergeDuplicatePoints, bool);
143 vtkGetMacro(MergeDuplicatePoints, bool);
144 vtkBooleanMacro(MergeDuplicatePoints, bool);
146
151
153
158 vtkSetMacro(TotalNumberOfDataSets, int);
159 vtkGetMacro(TotalNumberOfDataSets, int);
161
169
171
176 vtkSetMacro(OutputPointsPrecision, int);
177 vtkGetMacro(OutputPointsPrecision, int);
179
185 void Finish();
186
187protected:
189 ~vtkMergeCells() override;
190
191 void FreeLists();
197
199
202
205
206 int UseGlobalIds; // point, or node, IDs
207 int UseGlobalCellIds; // cell IDs
208
211
212 int OutputPointsPrecision = vtkAlgorithm::DEFAULT_PRECISION;
213
216
217 vtkMergeCellsSTLCloak* GlobalIdMap;
218 vtkMergeCellsSTLCloak* GlobalCellIdMap;
219
222
224
226
228
229private:
230 vtkMergeCells(const vtkMergeCells&) = delete;
231 void operator=(const vtkMergeCells&) = delete;
232};
233#endif
represent and manipulate cell attribute data
Definition: vtkCellData.h:42
helps manage arrays from multiple vtkDataSetAttributes.
abstract class to specify dataset behavior
Definition: vtkDataSet.h:63
Abstract class in support of both point location and point insertion.
a simple class to control print indentation
Definition: vtkIndent.h:40
merges any number of vtkDataSets back into a single vtkUnstructuredGrid
Definition: vtkMergeCells.h:66
vtkIdType TotalNumberOfCells
vtkIdType TotalNumberOfPoints
vtkDataSetAttributes::FieldList * PointList
vtkIdType NumberOfCells
int MergeDataSet(vtkDataSet *set)
Provide a DataSet to be merged in to the final UnstructuredGrid.
vtkIdType AddNewCellsUnstructuredGrid(vtkDataSet *set, vtkIdType *idMap)
int TotalNumberOfDataSets
void InvalidateCachedLocator()
Clear the Locator and set it to nullptr.
vtkUnstructuredGrid * UnstructuredGrid
vtkSmartPointer< vtkIncrementalPointLocator > Locator
vtkIdType NumberOfPoints
void Finish()
Call Finish() after merging last DataSet to free unneeded memory and to make sure the ugrid's GetNumb...
static vtkMergeCells * New()
void StartUGrid(vtkDataSet *set)
vtkMergeCellsSTLCloak * GlobalCellIdMap
vtkDataSetAttributes::FieldList * CellList
void FreeLists()
vtkIdType AddNewCellsDataSet(vtkDataSet *set, vtkIdType *idMap)
vtkIdType * MapPointsToIdsUsingLocator(vtkDataSet *set)
~vtkMergeCells() override
bool MergeDuplicatePoints
vtkMergeCellsSTLCloak * GlobalIdMap
double PointMergeTolerance
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
vtkIdType * MapPointsToIdsUsingGlobalIds(vtkDataSet *set)
virtual void SetUnstructuredGrid(vtkUnstructuredGrid *)
Set the vtkUnstructuredGrid object that will become the union of the DataSets specified in MergeDataS...
merge exactly coincident points
abstract base class for most VTK objects
Definition: vtkObject.h:63
represent and manipulate point attribute data
Definition: vtkPointData.h:42
Hold a reference to a vtkObjectBase instance.
dataset represents arbitrary combinations of all possible cell types
int vtkIdType
Definition: vtkType.h:332
#define VTK_DOUBLE_MAX
Definition: vtkType.h:165