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=========================================================================*/
54#ifndef vtkCellCenters_h
55#define vtkCellCenters_h
56
57#include "vtkFiltersCoreModule.h" // For export macro
59
60class vtkDoubleArray;
61
62class VTKFILTERSCORE_EXPORT vtkCellCenters : public vtkPolyDataAlgorithm
63{
64public:
66 void PrintSelf(ostream& os, vtkIndent indent) override;
67
72
74
78 vtkSetMacro(VertexCells, bool);
79 vtkGetMacro(VertexCells, bool);
80 vtkBooleanMacro(VertexCells, bool);
82
84
89 vtkSetMacro(CopyArrays, bool);
90 vtkGetMacro(CopyArrays, bool);
91 vtkBooleanMacro(CopyArrays, bool);
93
97 static void ComputeCellCenters(vtkDataSet* dataset, vtkDoubleArray* centers);
98
99protected:
100 vtkCellCenters() = default;
101 ~vtkCellCenters() override = default;
102
104 int FillInputPortInformation(int port, vtkInformation* info) override;
105
106 bool VertexCells = false;
107 bool CopyArrays = true;
108
109private:
110 vtkCellCenters(const vtkCellCenters&) = delete;
111 void operator=(const vtkCellCenters&) = delete;
112};
113
114#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:72
dynamic, self-adjusting array of double
a simple class to control print indentation
Definition vtkIndent.h:49
Store zero or more vtkInformation instances.
Store vtkAlgorithm input/output information.
Superclass for algorithms that produce only polydata as output.