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 =========================================================================*/
78 #ifndef vtkCellCenters_h
79 #define vtkCellCenters_h
80 
81 #include "vtkFiltersCoreModule.h" // For export macro
82 #include "vtkPolyDataAlgorithm.h"
83 
84 class vtkDoubleArray;
85 
86 class VTKFILTERSCORE_EXPORT vtkCellCenters : public vtkPolyDataAlgorithm
87 {
88 public:
90  void PrintSelf(ostream& os, vtkIndent indent) override;
91 
95  static vtkCellCenters* New();
96 
98 
102  vtkSetMacro(VertexCells, bool);
103  vtkGetMacro(VertexCells, bool);
104  vtkBooleanMacro(VertexCells, bool);
106 
108 
113  vtkSetMacro(CopyArrays, bool);
114  vtkGetMacro(CopyArrays, bool);
115  vtkBooleanMacro(CopyArrays, bool);
117 
121  static void ComputeCellCenters(vtkDataSet* dataset, vtkDoubleArray* centers);
122 
123 protected:
124  vtkCellCenters() = default;
125  ~vtkCellCenters() override = default;
126 
129 
130  bool VertexCells = false;
131  bool CopyArrays = true;
132 
133 private:
134  vtkCellCenters(const vtkCellCenters&) = delete;
135  void operator=(const vtkCellCenters&) = delete;
136 };
137 
138 #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:166
dynamic, self-adjusting array of double
a simple class to control print indentation
Definition: vtkIndent.h:113
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