VTK  9.7.1
vtkGenerateRegionIds.h
Go to the documentation of this file.
1 // SPDX-FileCopyrightText: Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
2 // SPDX-License-Identifier: BSD-3-Clause
32 #ifndef vtkGenerateRegionIds_h
33 #define vtkGenerateRegionIds_h
34 
35 #include "vtkFiltersCoreModule.h" // For export macro
36 #include "vtkPolyDataAlgorithm.h"
37 #include "vtkWrappingHints.h" // For VTK_MARSHALAUTO
38 
39 #include <set> // for std::set
40 #include <string> // for std::string
41 
42 VTK_ABI_NAMESPACE_BEGIN
43 
44 class VTKFILTERSCORE_EXPORT VTK_MARSHALAUTO vtkGenerateRegionIds : public vtkPolyDataAlgorithm
45 {
46 public:
48  void PrintSelf(ostream& os, vtkIndent indent) override;
49 
50  static vtkGenerateRegionIds* New();
51 
53 
60  vtkSetClampMacro(MaxAngle, double, 0, VTK_DOUBLE_MAX);
61  vtkGetMacro(MaxAngle, double);
63 
65 
69  vtkSetMacro(RegionIdsArrayName, std::string);
70  vtkGetMacro(RegionIdsArrayName, std::string);
72 
73 protected:
74  vtkGenerateRegionIds() = default;
75  ~vtkGenerateRegionIds() override = default;
76 
78 
79 private:
81  void operator=(const vtkGenerateRegionIds&) = delete;
82 
89  vtkIdTypeArray* InitializeOutput(vtkPolyData* input, vtkPolyData* output);
90 
94  bool SameRegion(vtkDataArray* normals, double threshold, vtkIdType first, vtkIdType second);
95 
100  std::set<vtkIdType> GetCellNeighbors(vtkPolyData* polydata, vtkIdType cellId);
101 
102  double MaxAngle = 30;
103  std::string RegionIdsArrayName = "vtkRegionIds";
104 };
105 
106 VTK_ABI_NAMESPACE_END
107 #endif
#define VTK_DOUBLE_MAX
Definition: vtkType.h:202
Store vtkAlgorithm input/output information.
virtual int RequestData(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector)
This is called by the superclass.
Generate cell array containing the region id.
dynamic, self-adjusting array of vtkIdType
int vtkIdType
Definition: vtkType.h:363
concrete dataset represents vertices, lines, polygons, and triangle strips
Definition: vtkPolyData.h:71
static vtkPolyDataAlgorithm * New()
Superclass for algorithms that produce only polydata as output.
a simple class to control print indentation
Definition: vtkIndent.h:28
abstract superclass for arrays of numeric data
Definition: vtkDataArray.h:44
Store zero or more vtkInformation instances.
#define VTK_MARSHALAUTO
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.