VTK  9.5.20250803
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
132#include <string>
133
134VTK_ABI_NAMESPACE_BEGIN
135class vtkCellData;
136class vtkPointData;
137class VTKFILTERSCORE_EXPORT vtkGenerateIds : public vtkPassInputTypeAlgorithm
138{
139public:
141 void PrintSelf(ostream& os, vtkIndent indent) override;
142
148
150
156 vtkSetMacro(PointIds, bool);
157 vtkGetMacro(PointIds, bool);
158 vtkBooleanMacro(PointIds, bool);
160
162
168 vtkSetMacro(CellIds, bool);
169 vtkGetMacro(CellIds, bool);
170 vtkBooleanMacro(CellIds, bool);
172
174
179 vtkSetMacro(FieldData, bool);
180 vtkGetMacro(FieldData, bool);
181 vtkBooleanMacro(FieldData, bool);
183
185
191 vtkSetMacro(PointIdsArrayName, std::string);
192 vtkGetMacro(PointIdsArrayName, std::string);
194
196
200 vtkSetMacro(CellIdsArrayName, std::string);
201 vtkGetMacro(CellIdsArrayName, std::string);
203
204protected:
205 vtkGenerateIds() = default;
206 ~vtkGenerateIds() override = default;
207
209 int FillInputPortInformation(int port, vtkInformation* info) override;
210
211private:
212 vtkGenerateIds(const vtkGenerateIds&) = delete;
213 void operator=(const vtkGenerateIds&) = delete;
214
218 void GeneratePointIds(vtkPointData* outputPD, vtkIdType numPts);
219
223 void GenerateCellIds(vtkCellData* outputCD, vtkIdType numCells);
224
225 bool PointIds = true;
226 bool CellIds = true;
227 bool FieldData = false;
228 std::string PointIdsArrayName = "vtkPointIds";
229 std::string CellIdsArrayName = "vtkCellIds";
230};
231
232VTK_ABI_NAMESPACE_END
233#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