VTK  9.2.5
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
50
51class vtkDoubleArray;
52
53class VTKFILTERSCORE_EXPORT vtkCellCenters : public vtkPolyDataAlgorithm
54{
55public:
57 void PrintSelf(ostream& os, vtkIndent indent) override;
58
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
90protected:
91 vtkCellCenters() = default;
92 ~vtkCellCenters() override = default;
93
95 int FillInputPortInformation(int port, vtkInformation* info) override;
96
97 bool VertexCells = false;
98 bool CopyArrays = true;
99
100private:
101 vtkCellCenters(const vtkCellCenters&) = delete;
102 void operator=(const vtkCellCenters&) = delete;
103};
104
105#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:63
dynamic, self-adjusting array of double
a simple class to control print indentation
Definition: vtkIndent.h:40
Store zero or more vtkInformation instances.
Store vtkAlgorithm input/output information.
Superclass for algorithms that produce only polydata as output.