VTK  9.4.20241217
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
136#ifndef vtkGenerateIds_h
137#define vtkGenerateIds_h
138
139#include "vtkFiltersCoreModule.h" // For export macro
141
142#include <string>
143
144VTK_ABI_NAMESPACE_BEGIN
145class vtkCellData;
146class vtkPointData;
147class VTKFILTERSCORE_EXPORT vtkGenerateIds : public vtkPassInputTypeAlgorithm
148{
149public:
151 void PrintSelf(ostream& os, vtkIndent indent) override;
152
158
160
166 vtkSetMacro(PointIds, bool);
167 vtkGetMacro(PointIds, bool);
168 vtkBooleanMacro(PointIds, bool);
170
172
178 vtkSetMacro(CellIds, bool);
179 vtkGetMacro(CellIds, bool);
180 vtkBooleanMacro(CellIds, bool);
182
184
189 vtkSetMacro(FieldData, bool);
190 vtkGetMacro(FieldData, bool);
191 vtkBooleanMacro(FieldData, bool);
193
195
201 vtkSetMacro(PointIdsArrayName, std::string);
202 vtkGetMacro(PointIdsArrayName, std::string);
204
206
210 vtkSetMacro(CellIdsArrayName, std::string);
211 vtkGetMacro(CellIdsArrayName, std::string);
213
214protected:
215 vtkGenerateIds() = default;
216 ~vtkGenerateIds() override = default;
217
219 int FillInputPortInformation(int port, vtkInformation* info) override;
220
221private:
222 vtkGenerateIds(const vtkGenerateIds&) = delete;
223 void operator=(const vtkGenerateIds&) = delete;
224
228 void GeneratePointIds(vtkPointData* outputPD, vtkIdType numPts);
229
233 void GenerateCellIds(vtkCellData* outputCD, vtkIdType numCells);
234
235 bool PointIds = true;
236 bool CellIds = true;
237 bool FieldData = false;
238 std::string PointIdsArrayName = "vtkPointIds";
239 std::string CellIdsArrayName = "vtkCellIds";
240};
241
242VTK_ABI_NAMESPACE_END
243#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:315