VTK  9.3.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 
39 VTK_ABI_NAMESPACE_BEGIN
40 class vtkDoubleArray;
41 
42 class VTKFILTERSCORE_EXPORT vtkCellCenters : public vtkPolyDataAlgorithm
43 {
44 public:
46  void PrintSelf(ostream& os, vtkIndent indent) override;
47 
51  static vtkCellCenters* New();
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 
79 protected:
80  vtkCellCenters() = default;
81  ~vtkCellCenters() override = default;
82 
85 
86  bool VertexCells = false;
87  bool CopyArrays = true;
88 
89 private:
90  vtkCellCenters(const vtkCellCenters&) = delete;
91  void operator=(const vtkCellCenters&) = delete;
92 };
93 
94 VTK_ABI_NAMESPACE_END
95 #endif
Store vtkAlgorithm input/output information.
abstract class to specify dataset behavior
Definition: vtkDataSet.h:52
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.
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.