VTK  9.3.0
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
42#ifndef vtkCellCenters_h
43#define vtkCellCenters_h
44
45#include "vtkFiltersCoreModule.h" // For export macro
47
48VTK_ABI_NAMESPACE_BEGIN
49class vtkDoubleArray;
50
51class VTKFILTERSCORE_EXPORT vtkCellCenters : public vtkPolyDataAlgorithm
52{
53public:
55 void PrintSelf(ostream& os, vtkIndent indent) override;
56
61
63
67 vtkSetMacro(VertexCells, bool);
68 vtkGetMacro(VertexCells, bool);
69 vtkBooleanMacro(VertexCells, bool);
71
73
78 vtkSetMacro(CopyArrays, bool);
79 vtkGetMacro(CopyArrays, bool);
80 vtkBooleanMacro(CopyArrays, bool);
82
86 static void ComputeCellCenters(vtkDataSet* dataset, vtkDoubleArray* centers);
87
88protected:
89 vtkCellCenters() = default;
90 ~vtkCellCenters() override = default;
91
93 int FillInputPortInformation(int port, vtkInformation* info) override;
94
95 bool VertexCells = false;
96 bool CopyArrays = true;
97
98private:
99 vtkCellCenters(const vtkCellCenters&) = delete;
100 void operator=(const vtkCellCenters&) = delete;
101};
102
103VTK_ABI_NAMESPACE_END
104#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:62
dynamic, self-adjusting array of double
a simple class to control print indentation
Definition vtkIndent.h:38
Store zero or more vtkInformation instances.
Store vtkAlgorithm input/output information.
Superclass for algorithms that produce only polydata as output.