VTK  9.4.20241217
vtkCellCenters.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
72#ifndef vtkCellCenters_h
73#define vtkCellCenters_h
74
75#include "vtkFiltersCoreModule.h" // For export macro
77
78VTK_ABI_NAMESPACE_BEGIN
79class vtkDoubleArray;
80
81class VTKFILTERSCORE_EXPORT vtkCellCenters : public vtkPolyDataAlgorithm
82{
83public:
85 void PrintSelf(ostream& os, vtkIndent indent) override;
86
91
93
97 vtkSetMacro(VertexCells, bool);
98 vtkGetMacro(VertexCells, bool);
99 vtkBooleanMacro(VertexCells, bool);
101
103
108 vtkSetMacro(CopyArrays, bool);
109 vtkGetMacro(CopyArrays, bool);
110 vtkBooleanMacro(CopyArrays, bool);
112
114
123 vtkSetMacro(ConvertGhostCellsToGhostPoints, bool);
124 vtkGetMacro(ConvertGhostCellsToGhostPoints, bool);
125 vtkBooleanMacro(ConvertGhostCellsToGhostPoints, bool);
127
131 static void ComputeCellCenters(vtkDataSet* dataset, vtkDoubleArray* centers);
132
133protected:
134 vtkCellCenters() = default;
135 ~vtkCellCenters() override = default;
136
138 int FillInputPortInformation(int port, vtkInformation* info) override;
139
140 bool VertexCells = false;
141 bool CopyArrays = true;
142 bool ConvertGhostCellsToGhostPoints = true;
143
144private:
145 vtkCellCenters(const vtkCellCenters&) = delete;
146 void operator=(const vtkCellCenters&) = delete;
147};
148
149VTK_ABI_NAMESPACE_END
150#endif
generate points at center of cells
int FillInputPortInformation(int port, vtkInformation *info) override
Fill the input port information objects for this algorithm.
static void ComputeCellCenters(vtkDataSet *dataset, vtkDoubleArray *centers)
Compute centers of cells from a dataset, storing them in the centers array.
int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *) override
This is called by the superclass.
vtkCellCenters()=default
~vtkCellCenters() override=default
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
static vtkCellCenters * New()
Construct object with vertex cell generation turned off.
abstract class to specify dataset behavior
Definition vtkDataSet.h:165
dynamic, self-adjusting array of double
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 only polydata as output.