vtkPMergeConnected.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkPMergeConnected.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  =========================================================================*/
23 #ifndef vtkPMergeConnected_h
24 #define vtkPMergeConnected_h
25 
27 #include "vtkPVVTKExtensionsCosmoToolsModule.h" // For export macro
28 
31 class vtkIdList;
32 class vtkFloatArray;
33 class vtkIdTypeArray;
34 
35 class VTKPVVTKEXTENSIONSCOSMOTOOLS_EXPORT vtkPMergeConnected : public vtkMultiBlockDataSetAlgorithm
36 {
37 public:
38  static vtkPMergeConnected* New();
40  void PrintSelf(ostream& os, vtkIndent indent);
41 
42  struct FaceWithKey
43  {
44  int num_pts;
46  };
47  struct cmp_ids;
48 
49 protected:
52 
54  int FillOutputPortInformation(int port, vtkInformation* info);
55 
56 private:
57  vtkPMergeConnected(const vtkPMergeConnected&) = delete;
58  void operator=(const vtkPMergeConnected&) = delete;
59 
60  // parallelism
61  int NumProcesses;
62  int MyId;
63  vtkMultiProcessController* Controller;
64  void SetController(vtkMultiProcessController* c);
65 
66  // filter
67  void LocalToGlobalRegionId(vtkMultiProcessController* contr, vtkMultiBlockDataSet* data);
68  void MergeCellsOnRegionId(vtkUnstructuredGrid* ugrid, int target, vtkIdList* facestream);
69  float MergeCellDataOnRegionId(
70  vtkFloatArray* data_array, vtkIdTypeArray* rid_array, vtkIdType target);
71 
72  void delete_key(FaceWithKey* key);
73  FaceWithKey* IdsToKey(vtkIdList* ids);
74 };
75 
76 #endif
int vtkIdType
static vtkMultiBlockDataSetAlgorithm * New()
This filter merges connected voroni tessellation regions based on the global region ID...
void PrintSelf(ostream &os, vtkIndent indent) VTK_OVERRIDE
key