VTK  9.0.1
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 "vtkDataSetAttributes.h" // Needed for FieldList
49 #include "vtkFiltersGeneralModule.h" // For export macro
50 #include "vtkObject.h"
51 #include "vtkSmartPointer.h" //fot vtkSmartPointer
52 
53 class vtkCellData;
54 class vtkDataSet;
55 class vtkMergeCellsSTLCloak;
56 class vtkMergePoints;
57 class vtkPointData;
59 
60 class VTKFILTERSGENERAL_EXPORT vtkMergeCells : public vtkObject
61 {
62 public:
63  vtkTypeMacro(vtkMergeCells, vtkObject);
64  void PrintSelf(ostream& os, vtkIndent indent) override;
65 
66  static vtkMergeCells* New();
67 
69 
74  virtual void SetUnstructuredGrid(vtkUnstructuredGrid*);
75  vtkGetObjectMacro(UnstructuredGrid, vtkUnstructuredGrid);
77 
79 
83  vtkSetMacro(TotalNumberOfCells, vtkIdType);
84  vtkGetMacro(TotalNumberOfCells, vtkIdType);
86 
88 
93  vtkSetMacro(TotalNumberOfPoints, vtkIdType);
94  vtkGetMacro(TotalNumberOfPoints, vtkIdType);
96 
98 
104  vtkSetMacro(UseGlobalIds, int);
105  vtkGetMacro(UseGlobalIds, int);
106  vtkBooleanMacro(UseGlobalIds, int);
108 
110 
117  vtkSetClampMacro(PointMergeTolerance, float, 0.0, VTK_FLOAT_MAX);
118  vtkGetMacro(PointMergeTolerance, float);
120 
122 
126  vtkSetMacro(UseGlobalCellIds, int);
127  vtkGetMacro(UseGlobalCellIds, int);
128  vtkBooleanMacro(UseGlobalCellIds, int);
130 
132 
137  vtkSetMacro(MergeDuplicatePoints, bool);
138  vtkGetMacro(MergeDuplicatePoints, bool);
139  vtkBooleanMacro(MergeDuplicatePoints, bool);
141 
145  void InvalidateCachedLocator();
146 
148 
153  vtkSetMacro(TotalNumberOfDataSets, int);
154  vtkGetMacro(TotalNumberOfDataSets, int);
156 
163  int MergeDataSet(vtkDataSet* set);
164 
170  void Finish();
171 
172 protected:
173  vtkMergeCells();
174  ~vtkMergeCells() override;
175 
176  void FreeLists();
177  void StartUGrid(vtkDataSet* set);
178  vtkIdType* MapPointsToIdsUsingGlobalIds(vtkDataSet* set);
179  vtkIdType* MapPointsToIdsUsingLocator(vtkDataSet* set);
180  vtkIdType AddNewCellsUnstructuredGrid(vtkDataSet* set, vtkIdType* idMap);
181  vtkIdType AddNewCellsDataSet(vtkDataSet* set, vtkIdType* idMap);
182 
184 
187 
190 
191  int UseGlobalIds; // point, or node, IDs
192  int UseGlobalCellIds; // cell IDs
193 
196 
199 
200  vtkMergeCellsSTLCloak* GlobalIdMap;
201  vtkMergeCellsSTLCloak* GlobalCellIdMap;
202 
205 
207 
208  int NextGrid;
209 
211 
212 private:
213  vtkMergeCells(const vtkMergeCells&) = delete;
214  void operator=(const vtkMergeCells&) = delete;
215 };
216 #endif
vtkMergeCells::TotalNumberOfCells
vtkIdType TotalNumberOfCells
Definition: vtkMergeCells.h:185
vtkMergeCells::InputIsUGrid
char InputIsUGrid
Definition: vtkMergeCells.h:197
vtkMergeCells::UseGlobalCellIds
int UseGlobalCellIds
Definition: vtkMergeCells.h:192
vtkMergeCells::CellList
vtkDataSetAttributes::FieldList * CellList
Definition: vtkMergeCells.h:204
vtkMergeCells::NextGrid
int NextGrid
Definition: vtkMergeCells.h:208
vtkPointData
represent and manipulate point attribute data
Definition: vtkPointData.h:31
vtkIdType
int vtkIdType
Definition: vtkType.h:338
vtkMergeCells::GlobalIdMap
vtkMergeCellsSTLCloak * GlobalIdMap
Definition: vtkMergeCells.h:200
vtkObject::New
static vtkObject * New()
Create an object with Debug turned off, modified time initialized to zero, and reference counting on.
vtkMergeCells::TotalNumberOfDataSets
int TotalNumberOfDataSets
Definition: vtkMergeCells.h:183
vtkMergeCells::Locator
vtkSmartPointer< vtkMergePoints > Locator
Definition: vtkMergeCells.h:210
vtkMergeCells::UseGlobalIds
int UseGlobalIds
Definition: vtkMergeCells.h:191
vtkSmartPointer< vtkMergePoints >
vtkObject
abstract base class for most VTK objects
Definition: vtkObject.h:62
vtkMergeCells::InputIsPointSet
char InputIsPointSet
Definition: vtkMergeCells.h:198
vtkMergeCells::TotalNumberOfPoints
vtkIdType TotalNumberOfPoints
Definition: vtkMergeCells.h:186
vtkMergeCells::UnstructuredGrid
vtkUnstructuredGrid * UnstructuredGrid
Definition: vtkMergeCells.h:206
vtkMergeCells::NumberOfCells
vtkIdType NumberOfCells
Definition: vtkMergeCells.h:188
vtkDataSetAttributesFieldList
helps manage arrays from multiple vtkDataSetAttributes.
Definition: vtkDataSetAttributesFieldList.h:69
vtkCellData
represent and manipulate cell attribute data
Definition: vtkCellData.h:32
vtkIndent
a simple class to control print indentation
Definition: vtkIndent.h:33
vtkMergeCells
merges any number of vtkDataSets back into a single vtkUnstructuredGrid
Definition: vtkMergeCells.h:60
vtkSmartPointer.h
vtkMergeCells::NumberOfPoints
vtkIdType NumberOfPoints
Definition: vtkMergeCells.h:189
vtkObject::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
VTK_FLOAT_MAX
#define VTK_FLOAT_MAX
Definition: vtkType.h:163
vtkObject.h
vtkDataSet
abstract class to specify dataset behavior
Definition: vtkDataSet.h:56
vtkMergeCells::MergeDuplicatePoints
bool MergeDuplicatePoints
Definition: vtkMergeCells.h:195
vtkUnstructuredGrid
dataset represents arbitrary combinations of all possible cell types
Definition: vtkUnstructuredGrid.h:92
vtkMergeCells::PointMergeTolerance
float PointMergeTolerance
Definition: vtkMergeCells.h:194
vtkMergeCells::GlobalCellIdMap
vtkMergeCellsSTLCloak * GlobalCellIdMap
Definition: vtkMergeCells.h:201
vtkDataSetAttributes.h
vtkMergePoints
merge exactly coincident points
Definition: vtkMergePoints.h:33
vtkMergeCells::PointList
vtkDataSetAttributes::FieldList * PointList
Definition: vtkMergeCells.h:203