VTK  9.4.20241117
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
37
38#include <set> // for std::set
39#include <string> // for std::string
40
41VTK_ABI_NAMESPACE_BEGIN
42
43class VTKFILTERSCORE_EXPORT vtkGenerateRegionIds : public vtkPolyDataAlgorithm
44{
45public:
47 void PrintSelf(ostream& os, vtkIndent indent) override;
48
50
52
59 vtkSetClampMacro(MaxAngle, double, 0, VTK_DOUBLE_MAX);
60 vtkGetMacro(MaxAngle, double);
62
64
68 vtkSetMacro(RegionIdsArrayName, std::string);
69 vtkGetMacro(RegionIdsArrayName, std::string);
71
72protected:
74 ~vtkGenerateRegionIds() override = default;
75
77
78private:
80 void operator=(const vtkGenerateRegionIds&) = delete;
81
88 vtkIdTypeArray* InitializeOutput(vtkPolyData* input, vtkPolyData* output);
89
93 bool SameRegion(vtkDataArray* normals, double threshold, vtkIdType first, vtkIdType second);
94
99 std::set<vtkIdType> GetCellNeighbors(vtkPolyData* polydata, vtkIdType cellId);
100
101 double MaxAngle = 30;
102 std::string RegionIdsArrayName = "vtkRegionIds";
103};
104
105VTK_ABI_NAMESPACE_END
106#endif
abstract superclass for arrays of numeric data
Generate cell array containing the region id.
static vtkGenerateRegionIds * New()
vtkGenerateRegionIds()=default
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *) override
This is called by the superclass.
~vtkGenerateRegionIds() override=default
dynamic, self-adjusting array of vtkIdType
a simple class to control print indentation
Definition vtkIndent.h:108
Store zero or more vtkInformation instances.
Store vtkAlgorithm input/output information.
Superclass for algorithms that produce only polydata as output.
concrete dataset represents vertices, lines, polygons, and triangle strips
int vtkIdType
Definition vtkType.h:315
#define VTK_DOUBLE_MAX
Definition vtkType.h:154