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
33#ifndef vtkCellCenters_h
34#define vtkCellCenters_h
35
36#include "vtkFiltersCoreModule.h" // For export macro
38
39VTK_ABI_NAMESPACE_BEGIN
40class vtkDoubleArray;
41
42class VTKFILTERSCORE_EXPORT vtkCellCenters : public vtkPolyDataAlgorithm
43{
44public:
46 void PrintSelf(ostream& os, vtkIndent indent) override;
47
52
54
58 vtkSetMacro(VertexCells, bool);
59 vtkGetMacro(VertexCells, bool);
60 vtkBooleanMacro(VertexCells, bool);
62
64
69 vtkSetMacro(CopyArrays, bool);
70 vtkGetMacro(CopyArrays, bool);
71 vtkBooleanMacro(CopyArrays, bool);
73
77 static void ComputeCellCenters(vtkDataSet* dataset, vtkDoubleArray* centers);
78
79protected:
80 vtkCellCenters() = default;
81 ~vtkCellCenters() override = default;
82
84 int FillInputPortInformation(int port, vtkInformation* info) override;
85
86 bool VertexCells = false;
87 bool CopyArrays = true;
88
89private:
90 vtkCellCenters(const vtkCellCenters&) = delete;
91 void operator=(const vtkCellCenters&) = delete;
92};
93
94VTK_ABI_NAMESPACE_END
95#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:53
dynamic, self-adjusting array of double
a simple class to control print indentation
Definition vtkIndent.h:29
Store zero or more vtkInformation instances.
Store vtkAlgorithm input/output information.
Superclass for algorithms that produce only polydata as output.