VTK  9.1.0
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 =========================================================================*/
39 #ifndef vtkCellCenters_h
40 #define vtkCellCenters_h
41 
42 #include "vtkFiltersCoreModule.h" // For export macro
43 #include "vtkPolyDataAlgorithm.h"
44 
45 class vtkDoubleArray;
46 
47 class VTKFILTERSCORE_EXPORT vtkCellCenters : public vtkPolyDataAlgorithm
48 {
49 public:
51  void PrintSelf(ostream& os, vtkIndent indent) override;
52 
56  static vtkCellCenters* New();
57 
59 
63  vtkSetMacro(VertexCells, bool);
64  vtkGetMacro(VertexCells, bool);
65  vtkBooleanMacro(VertexCells, bool);
67 
69 
74  vtkSetMacro(CopyArrays, bool);
75  vtkGetMacro(CopyArrays, bool);
76  vtkBooleanMacro(CopyArrays, bool);
78 
82  static void ComputeCellCenters(vtkDataSet* dataset, vtkDoubleArray* centers);
83 
84 protected:
85  vtkCellCenters() = default;
86  ~vtkCellCenters() override = default;
87 
90 
91  bool VertexCells = false;
92  bool CopyArrays = true;
93 
94 private:
95  vtkCellCenters(const vtkCellCenters&) = delete;
96  void operator=(const vtkCellCenters&) = delete;
97 };
98 
99 #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:57
dynamic, self-adjusting array of double
a simple class to control print indentation
Definition: vtkIndent.h:34
Store zero or more vtkInformation instances.
Store vtkAlgorithm input/output information.
Superclass for algorithms that produce only polydata as output.
@ info
Definition: vtkX3D.h:382
@ port
Definition: vtkX3D.h:453