VTK  9.5.20250904
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#include "vtkWrappingHints.h" // For VTK_MARSHALAUTO
88
89VTK_ABI_NAMESPACE_BEGIN
90class vtkDoubleArray;
91
92class VTKFILTERSCORE_EXPORT VTK_MARSHALAUTO vtkCellCenters : public vtkPolyDataAlgorithm
93{
94public:
96 void PrintSelf(ostream& os, vtkIndent indent) override;
97
102
104
108 vtkSetMacro(VertexCells, bool);
109 vtkGetMacro(VertexCells, bool);
110 vtkBooleanMacro(VertexCells, bool);
112
114
119 vtkSetMacro(CopyArrays, bool);
120 vtkGetMacro(CopyArrays, bool);
121 vtkBooleanMacro(CopyArrays, bool);
123
125
134 vtkSetMacro(ConvertGhostCellsToGhostPoints, bool);
135 vtkGetMacro(ConvertGhostCellsToGhostPoints, bool);
136 vtkBooleanMacro(ConvertGhostCellsToGhostPoints, bool);
138
142 static void ComputeCellCenters(vtkDataSet* dataset, vtkDoubleArray* centers);
143
144protected:
145 vtkCellCenters() = default;
146 ~vtkCellCenters() override = default;
147
149 int FillInputPortInformation(int port, vtkInformation* info) override;
150
151 bool VertexCells = false;
152 bool CopyArrays = true;
153 bool ConvertGhostCellsToGhostPoints = true;
154
155private:
156 vtkCellCenters(const vtkCellCenters&) = delete;
157 void operator=(const vtkCellCenters&) = delete;
158};
159
160VTK_ABI_NAMESPACE_END
161#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.
#define VTK_MARSHALAUTO