VTK  9.6.1
vtkGenerateIds.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
26
27#ifndef vtkGenerateIds_h
28#define vtkGenerateIds_h
29
30#include "vtkFiltersCoreModule.h" // For export macro
32#include "vtkWrappingHints.h" // For VTK_MARSHALAUTO
33
34#include <string>
35
36VTK_ABI_NAMESPACE_BEGIN
37class vtkCellData;
38class vtkPointData;
39class VTKFILTERSCORE_EXPORT VTK_MARSHALAUTO vtkGenerateIds : public vtkPassInputTypeAlgorithm
40{
41public:
43 void PrintSelf(ostream& os, vtkIndent indent) override;
44
50
52
58 vtkSetMacro(PointIds, bool);
59 vtkGetMacro(PointIds, bool);
60 vtkBooleanMacro(PointIds, bool);
62
64
70 vtkSetMacro(CellIds, bool);
71 vtkGetMacro(CellIds, bool);
72 vtkBooleanMacro(CellIds, bool);
74
76
81 vtkSetMacro(FieldData, bool);
82 vtkGetMacro(FieldData, bool);
83 vtkBooleanMacro(FieldData, bool);
85
87
93 vtkSetMacro(PointIdsArrayName, std::string);
94 vtkGetMacro(PointIdsArrayName, std::string);
96
98
102 vtkSetMacro(CellIdsArrayName, std::string);
103 vtkGetMacro(CellIdsArrayName, std::string);
105
106protected:
107 vtkGenerateIds() = default;
108 ~vtkGenerateIds() override = default;
109
111 int FillInputPortInformation(int port, vtkInformation* info) override;
112
113private:
114 vtkGenerateIds(const vtkGenerateIds&) = delete;
115 void operator=(const vtkGenerateIds&) = delete;
116
120 void GeneratePointIds(vtkPointData* outputPD, vtkIdType numPts);
121
125 void GenerateCellIds(vtkCellData* outputCD, vtkIdType numCells);
126
127 bool PointIds = true;
128 bool CellIds = true;
129 bool FieldData = false;
130 std::string PointIdsArrayName = "vtkPointIds";
131 std::string CellIdsArrayName = "vtkCellIds";
132};
133
134VTK_ABI_NAMESPACE_END
135#endif
represent and manipulate cell attribute data
Definition vtkCellData.h:32
~vtkGenerateIds() override=default
static vtkGenerateIds * New()
Construct object with PointIds and CellIds on; and ids being generated as scalars.
int FillInputPortInformation(int port, vtkInformation *info) override
vtkGenerateIds()=default
int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *) override
This is called within ProcessRequest when a request asks the algorithm to do its work.
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
a simple class to control print indentation
Definition vtkIndent.h:29
Store zero or more vtkInformation instances.
Store vtkAlgorithm input/output information.
represent and manipulate point attribute data
int vtkIdType
Definition vtkType.h:368
#define VTK_MARSHALAUTO