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
46 #include "vtkPolyDataAlgorithm.h"
47 
48 VTK_ABI_NAMESPACE_BEGIN
49 class vtkDoubleArray;
50 
51 class VTKFILTERSCORE_EXPORT vtkCellCenters : public vtkPolyDataAlgorithm
52 {
53 public:
55  void PrintSelf(ostream& os, vtkIndent indent) override;
56 
60  static vtkCellCenters* New();
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 
88 protected:
89  vtkCellCenters() = default;
90  ~vtkCellCenters() override = default;
91 
94 
95  bool VertexCells = false;
96  bool CopyArrays = true;
97 
98 private:
99  vtkCellCenters(const vtkCellCenters&) = delete;
100  void operator=(const vtkCellCenters&) = delete;
101 };
102 
103 VTK_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.
@ info
Definition: vtkX3D.h:376
@ port
Definition: vtkX3D.h:447