VTK  9.2.6
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 =========================================================================*/
45 #ifndef vtkCellCenters_h
46 #define vtkCellCenters_h
47 
48 #include "vtkFiltersCoreModule.h" // For export macro
49 #include "vtkPolyDataAlgorithm.h"
50 
51 class vtkDoubleArray;
52 
53 class VTKFILTERSCORE_EXPORT vtkCellCenters : public vtkPolyDataAlgorithm
54 {
55 public:
57  void PrintSelf(ostream& os, vtkIndent indent) override;
58 
62  static vtkCellCenters* New();
63 
65 
69  vtkSetMacro(VertexCells, bool);
70  vtkGetMacro(VertexCells, bool);
71  vtkBooleanMacro(VertexCells, bool);
73 
75 
80  vtkSetMacro(CopyArrays, bool);
81  vtkGetMacro(CopyArrays, bool);
82  vtkBooleanMacro(CopyArrays, bool);
84 
88  static void ComputeCellCenters(vtkDataSet* dataset, vtkDoubleArray* centers);
89 
90 protected:
91  vtkCellCenters() = default;
92  ~vtkCellCenters() override = default;
93 
96 
97  bool VertexCells = false;
98  bool CopyArrays = true;
99 
100 private:
101  vtkCellCenters(const vtkCellCenters&) = delete;
102  void operator=(const vtkCellCenters&) = delete;
103 };
104 
105 #endif
Store vtkAlgorithm input/output information.
abstract class to specify dataset behavior
Definition: vtkDataSet.h:62
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:39
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.