VTK  9.1.0
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
45#ifndef vtkMergeCells_h
46#define vtkMergeCells_h
47
48#include "vtkAlgorithm.h" // for vtkAlgorithm::DEFAULT_PRECISION
49#include "vtkDataSetAttributes.h" // Needed for FieldList
50#include "vtkFiltersGeneralModule.h" // For export macro
51#include "vtkObject.h"
52#include "vtkSmartPointer.h" //fot vtkSmartPointer
53
54class vtkCellData;
55class vtkDataSet;
56class vtkMergeCellsSTLCloak;
57class vtkMergePoints;
59class vtkPointData;
61
62class VTKFILTERSGENERAL_EXPORT vtkMergeCells : public vtkObject
63{
64public:
65 vtkTypeMacro(vtkMergeCells, vtkObject);
66 void PrintSelf(ostream& os, vtkIndent indent) override;
67
68 static vtkMergeCells* New();
69
71
77 vtkGetObjectMacro(UnstructuredGrid, vtkUnstructuredGrid);
79
81
85 vtkSetMacro(TotalNumberOfCells, vtkIdType);
86 vtkGetMacro(TotalNumberOfCells, vtkIdType);
88
90
95 vtkSetMacro(TotalNumberOfPoints, vtkIdType);
96 vtkGetMacro(TotalNumberOfPoints, vtkIdType);
98
100
106 vtkSetMacro(UseGlobalIds, int);
107 vtkGetMacro(UseGlobalIds, int);
108 vtkBooleanMacro(UseGlobalIds, int);
110
112
119 vtkSetClampMacro(PointMergeTolerance, double, 0.0, VTK_DOUBLE_MAX);
120 vtkGetMacro(PointMergeTolerance, double);
122
124
128 vtkSetMacro(UseGlobalCellIds, int);
129 vtkGetMacro(UseGlobalCellIds, int);
130 vtkBooleanMacro(UseGlobalCellIds, int);
132
134
139 vtkSetMacro(MergeDuplicatePoints, bool);
140 vtkGetMacro(MergeDuplicatePoints, bool);
141 vtkBooleanMacro(MergeDuplicatePoints, bool);
143
148
150
155 vtkSetMacro(TotalNumberOfDataSets, int);
156 vtkGetMacro(TotalNumberOfDataSets, int);
158
166
168
173 vtkSetMacro(OutputPointsPrecision, int);
174 vtkGetMacro(OutputPointsPrecision, int);
176
182 void Finish();
183
184protected:
186 ~vtkMergeCells() override;
187
188 void FreeLists();
194
196
199
202
203 int UseGlobalIds; // point, or node, IDs
204 int UseGlobalCellIds; // cell IDs
205
208
209 int OutputPointsPrecision = vtkAlgorithm::DEFAULT_PRECISION;
210
213
214 vtkMergeCellsSTLCloak* GlobalIdMap;
215 vtkMergeCellsSTLCloak* GlobalCellIdMap;
216
219
221
223
225
226private:
227 vtkMergeCells(const vtkMergeCells&) = delete;
228 void operator=(const vtkMergeCells&) = delete;
229};
230#endif
represent and manipulate cell attribute data
Definition: vtkCellData.h:142
helps manage arrays from multiple vtkDataSetAttributes.
abstract class to specify dataset behavior
Definition: vtkDataSet.h:166
Abstract class in support of both point location and point insertion.
a simple class to control print indentation
Definition: vtkIndent.h:113
merges any number of vtkDataSets back into a single vtkUnstructuredGrid
Definition: vtkMergeCells.h:63
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:82
represent and manipulate point attribute data
Definition: vtkPointData.h:142
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