VTK  9.7.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
33 #ifndef vtkCellCenters_h
34 #define vtkCellCenters_h
35 
36 #include "vtkFiltersCoreModule.h" // For export macro
37 #include "vtkPolyDataAlgorithm.h"
38 #include "vtkWrappingHints.h" // For VTK_MARSHALAUTO
39 
40 VTK_ABI_NAMESPACE_BEGIN
41 class vtkDoubleArray;
42 
43 class VTKFILTERSCORE_EXPORT VTK_MARSHALAUTO vtkCellCenters : public vtkPolyDataAlgorithm
44 {
45 public:
47  void PrintSelf(ostream& os, vtkIndent indent) override;
48 
52  static vtkCellCenters* New();
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 
85  vtkSetMacro(ConvertGhostCellsToGhostPoints, bool);
86  vtkGetMacro(ConvertGhostCellsToGhostPoints, bool);
87  vtkBooleanMacro(ConvertGhostCellsToGhostPoints, bool);
89 
93  static void ComputeCellCenters(vtkDataSet* dataset, vtkDoubleArray* centers);
94 
95 protected:
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;
104  bool ConvertGhostCellsToGhostPoints = true;
105 
106 private:
107  vtkCellCenters(const vtkCellCenters&) = delete;
108  void operator=(const vtkCellCenters&) = delete;
109 };
110 
111 VTK_ABI_NAMESPACE_END
112 #endif
Store vtkAlgorithm input/output information.
abstract class to specify dataset behavior
Definition: vtkDataSet.h:56
virtual int RequestData(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector)
This is called by the superclass.
generate points at center of cells
dynamic, self-adjusting array of double
static vtkPolyDataAlgorithm * New()
Superclass for algorithms that produce only polydata as output.
a simple class to control print indentation
Definition: vtkIndent.h:28
int FillInputPortInformation(int port, vtkInformation *info) override
Fill the input port information objects for this algorithm.
Store zero or more vtkInformation instances.
#define VTK_MARSHALAUTO
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.