VTK  9.0.20210125
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
vtkInformationVector
Store zero or more vtkInformation instances.
Definition: vtkInformationVector.h:35
vtkPolyDataAlgorithm::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
vtkPolyDataAlgorithm.h
vtkX3D::port
Definition: vtkX3D.h:453
vtkPolyDataAlgorithm::RequestData
virtual int RequestData(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector)
This is called by the superclass.
vtkIndent
a simple class to control print indentation
Definition: vtkIndent.h:33
vtkPolyDataAlgorithm::FillInputPortInformation
int FillInputPortInformation(int port, vtkInformation *info) override
Fill the input port information objects for this algorithm.
vtkDataSet
abstract class to specify dataset behavior
Definition: vtkDataSet.h:56
vtkInformation
Store vtkAlgorithm input/output information.
Definition: vtkInformation.h:73
vtkX3D::info
Definition: vtkX3D.h:382
vtkDoubleArray
dynamic, self-adjusting array of double
Definition: vtkDoubleArray.h:35
vtkCellCenters
generate points at center of cells
Definition: vtkCellCenters.h:47
vtkPolyDataAlgorithm::New
static vtkPolyDataAlgorithm * New()
vtkPolyDataAlgorithm
Superclass for algorithms that produce only polydata as output.
Definition: vtkPolyDataAlgorithm.h:41