VTK  9.6.1
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
32
33#ifndef vtkCellCenters_h
34#define vtkCellCenters_h
35
36#include "vtkFiltersCoreModule.h" // For export macro
38#include "vtkWrappingHints.h" // For VTK_MARSHALAUTO
39
40VTK_ABI_NAMESPACE_BEGIN
41class vtkDoubleArray;
42
43class VTKFILTERSCORE_EXPORT VTK_MARSHALAUTO vtkCellCenters : public vtkPolyDataAlgorithm
44{
45public:
47 void PrintSelf(ostream& os, vtkIndent indent) override;
48
53
55
59 vtkSetMacro(VertexCells, bool);
60 vtkGetMacro(VertexCells, bool);
61 vtkBooleanMacro(VertexCells, bool);
63
65
70 vtkSetMacro(CopyArrays, bool);
71 vtkGetMacro(CopyArrays, bool);
72 vtkBooleanMacro(CopyArrays, bool);
74
76
87 vtkBooleanMacro(ConvertGhostCellsToGhostPoints, bool);
89
93 static void ComputeCellCenters(vtkDataSet* dataset, vtkDoubleArray* centers);
94
95protected:
96 vtkCellCenters() = default;
97 ~vtkCellCenters() override = default;
98
100 int FillInputPortInformation(int port, vtkInformation* info) override;
101
102 bool VertexCells = false;
103 bool CopyArrays = true;
105
106private:
107 vtkCellCenters(const vtkCellCenters&) = delete;
108 void operator=(const vtkCellCenters&) = delete;
109};
110
111VTK_ABI_NAMESPACE_END
112#endif
int FillInputPortInformation(int port, vtkInformation *info) override
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.
bool ConvertGhostCellsToGhostPoints
static vtkCellCenters * New()
Construct object with vertex cell generation turned off.
abstract class to specify dataset behavior
Definition vtkDataSet.h:57
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.
#define VTK_MARSHALAUTO