VTK  9.5.20250907
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
126#ifndef vtkGenerateIds_h
127#define vtkGenerateIds_h
128
129#include "vtkFiltersCoreModule.h" // For export macro
131#include "vtkWrappingHints.h" // For VTK_MARSHALAUTO
132
133#include <string>
134
135VTK_ABI_NAMESPACE_BEGIN
136class vtkCellData;
137class vtkPointData;
138class VTKFILTERSCORE_EXPORT VTK_MARSHALAUTO vtkGenerateIds : public vtkPassInputTypeAlgorithm
139{
140public:
142 void PrintSelf(ostream& os, vtkIndent indent) override;
143
149
151
157 vtkSetMacro(PointIds, bool);
158 vtkGetMacro(PointIds, bool);
159 vtkBooleanMacro(PointIds, bool);
161
163
169 vtkSetMacro(CellIds, bool);
170 vtkGetMacro(CellIds, bool);
171 vtkBooleanMacro(CellIds, bool);
173
175
180 vtkSetMacro(FieldData, bool);
181 vtkGetMacro(FieldData, bool);
182 vtkBooleanMacro(FieldData, bool);
184
186
192 vtkSetMacro(PointIdsArrayName, std::string);
193 vtkGetMacro(PointIdsArrayName, std::string);
195
197
201 vtkSetMacro(CellIdsArrayName, std::string);
202 vtkGetMacro(CellIdsArrayName, std::string);
204
205protected:
206 vtkGenerateIds() = default;
207 ~vtkGenerateIds() override = default;
208
210 int FillInputPortInformation(int port, vtkInformation* info) override;
211
212private:
213 vtkGenerateIds(const vtkGenerateIds&) = delete;
214 void operator=(const vtkGenerateIds&) = delete;
215
219 void GeneratePointIds(vtkPointData* outputPD, vtkIdType numPts);
220
224 void GenerateCellIds(vtkCellData* outputCD, vtkIdType numCells);
225
226 bool PointIds = true;
227 bool CellIds = true;
228 bool FieldData = false;
229 std::string PointIdsArrayName = "vtkPointIds";
230 std::string CellIdsArrayName = "vtkCellIds";
231};
232
233VTK_ABI_NAMESPACE_END
234#endif
represent and manipulate cell attribute data
generate scalars or field data from point and cell ids
~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
Fill the input port information objects for this algorithm.
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:108
Store zero or more vtkInformation instances.
Store vtkAlgorithm input/output information.
Superclass for algorithms that produce output of the same type as input.
represent and manipulate point attribute data
int vtkIdType
Definition vtkType.h:332
#define VTK_MARSHALAUTO