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=========================================================================*/
84#ifndef vtkCellCenters_h
85#define vtkCellCenters_h
86
87#include "vtkFiltersCoreModule.h" // For export macro
89
90class vtkDoubleArray;
91
92class VTKFILTERSCORE_EXPORT vtkCellCenters : public vtkPolyDataAlgorithm
93{
94public:
96 void PrintSelf(ostream& os, vtkIndent indent) override;
97
102
104
108 vtkSetMacro(VertexCells, bool);
109 vtkGetMacro(VertexCells, bool);
110 vtkBooleanMacro(VertexCells, bool);
112
114
119 vtkSetMacro(CopyArrays, bool);
120 vtkGetMacro(CopyArrays, bool);
121 vtkBooleanMacro(CopyArrays, bool);
123
127 static void ComputeCellCenters(vtkDataSet* dataset, vtkDoubleArray* centers);
128
129protected:
130 vtkCellCenters() = default;
131 ~vtkCellCenters() override = default;
132
135
136 bool VertexCells = false;
137 bool CopyArrays = true;
138
139private:
140 vtkCellCenters(const vtkCellCenters&) = delete;
141 void operator=(const vtkCellCenters&) = delete;
142};
143
144#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:172
dynamic, self-adjusting array of double
a simple class to control print indentation
Definition: vtkIndent.h:119
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