VTK  9.4.20250323
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
82#ifndef vtkCellCenters_h
83#define vtkCellCenters_h
84
85#include "vtkFiltersCoreModule.h" // For export macro
87
88VTK_ABI_NAMESPACE_BEGIN
89class vtkDoubleArray;
90
91class VTKFILTERSCORE_EXPORT vtkCellCenters : public vtkPolyDataAlgorithm
92{
93public:
95 void PrintSelf(ostream& os, vtkIndent indent) override;
96
101
103
107 vtkSetMacro(VertexCells, bool);
108 vtkGetMacro(VertexCells, bool);
109 vtkBooleanMacro(VertexCells, bool);
111
113
118 vtkSetMacro(CopyArrays, bool);
119 vtkGetMacro(CopyArrays, bool);
120 vtkBooleanMacro(CopyArrays, bool);
122
124
133 vtkSetMacro(ConvertGhostCellsToGhostPoints, bool);
134 vtkGetMacro(ConvertGhostCellsToGhostPoints, bool);
135 vtkBooleanMacro(ConvertGhostCellsToGhostPoints, bool);
137
141 static void ComputeCellCenters(vtkDataSet* dataset, vtkDoubleArray* centers);
142
143protected:
144 vtkCellCenters() = default;
145 ~vtkCellCenters() override = default;
146
148 int FillInputPortInformation(int port, vtkInformation* info) override;
149
150 bool VertexCells = false;
151 bool CopyArrays = true;
152 bool ConvertGhostCellsToGhostPoints = true;
153
154private:
155 vtkCellCenters(const vtkCellCenters&) = delete;
156 void operator=(const vtkCellCenters&) = delete;
157};
158
159VTK_ABI_NAMESPACE_END
160#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.