VTK  9.2.20230327
vtkCellCenters.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkCellCenters.h
5 
6  Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
7  All rights reserved.
8  See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
9 
10  This software is distributed WITHOUT ANY WARRANTY; without even
11  the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
12  PURPOSE. See the above copyright notice for more information.
13 
14 =========================================================================*/
84 #ifndef vtkCellCenters_h
85 #define vtkCellCenters_h
86 
87 #include "vtkFiltersCoreModule.h" // For export macro
88 #include "vtkPolyDataAlgorithm.h"
89 
90 VTK_ABI_NAMESPACE_BEGIN
91 class vtkDoubleArray;
92 
93 class VTKFILTERSCORE_EXPORT vtkCellCenters : public vtkPolyDataAlgorithm
94 {
95 public:
97  void PrintSelf(ostream& os, vtkIndent indent) override;
98 
102  static vtkCellCenters* New();
103 
105 
109  vtkSetMacro(VertexCells, bool);
110  vtkGetMacro(VertexCells, bool);
111  vtkBooleanMacro(VertexCells, bool);
113 
115 
120  vtkSetMacro(CopyArrays, bool);
121  vtkGetMacro(CopyArrays, bool);
122  vtkBooleanMacro(CopyArrays, bool);
124 
128  static void ComputeCellCenters(vtkDataSet* dataset, vtkDoubleArray* centers);
129 
130 protected:
131  vtkCellCenters() = default;
132  ~vtkCellCenters() override = default;
133 
136 
137  bool VertexCells = false;
138  bool CopyArrays = true;
139 
140 private:
141  vtkCellCenters(const vtkCellCenters&) = delete;
142  void operator=(const vtkCellCenters&) = delete;
143 };
144 
145 VTK_ABI_NAMESPACE_END
146 #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:174
dynamic, self-adjusting array of double
a simple class to control print indentation
Definition: vtkIndent.h:120
Store zero or more vtkInformation instances.
Store vtkAlgorithm input/output information.
Superclass for algorithms that produce only polydata as output.
@ info
Definition: vtkX3D.h:388
@ port
Definition: vtkX3D.h:459