VTK  9.5.2
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
33#include <string>
34
35VTK_ABI_NAMESPACE_BEGIN
36class vtkCellData;
37class vtkPointData;
38class VTKFILTERSCORE_EXPORT vtkGenerateIds : public vtkPassInputTypeAlgorithm
39{
40public:
42 void PrintSelf(ostream& os, vtkIndent indent) override;
43
49
51
57 vtkSetMacro(PointIds, bool);
58 vtkGetMacro(PointIds, bool);
59 vtkBooleanMacro(PointIds, bool);
61
63
69 vtkSetMacro(CellIds, bool);
70 vtkGetMacro(CellIds, bool);
71 vtkBooleanMacro(CellIds, bool);
73
75
80 vtkSetMacro(FieldData, bool);
81 vtkGetMacro(FieldData, bool);
82 vtkBooleanMacro(FieldData, bool);
84
86
92 vtkSetMacro(PointIdsArrayName, std::string);
93 vtkGetMacro(PointIdsArrayName, std::string);
95
97
101 vtkSetMacro(CellIdsArrayName, std::string);
102 vtkGetMacro(CellIdsArrayName, std::string);
104
105protected:
106 vtkGenerateIds() = default;
107 ~vtkGenerateIds() override = default;
108
110 int FillInputPortInformation(int port, vtkInformation* info) override;
111
112private:
113 vtkGenerateIds(const vtkGenerateIds&) = delete;
114 void operator=(const vtkGenerateIds&) = delete;
115
119 void GeneratePointIds(vtkPointData* outputPD, vtkIdType numPts);
120
124 void GenerateCellIds(vtkCellData* outputCD, vtkIdType numCells);
125
126 bool PointIds = true;
127 bool CellIds = true;
128 bool FieldData = false;
129 std::string PointIdsArrayName = "vtkPointIds";
130 std::string CellIdsArrayName = "vtkCellIds";
131};
132
133VTK_ABI_NAMESPACE_END
134#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:332