VTK  9.3.0
vtkExtractCells.h
Go to the documentation of this file.
1// SPDX-FileCopyrightText: Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
2// SPDX-FileCopyrightText: Copyright (c) Sandia Corporation
3// SPDX-License-Identifier: BSD-3-Clause
4
27#ifndef vtkExtractCells_h
28#define vtkExtractCells_h
29
30#include "vtkFiltersCoreModule.h" // For export macro
31#include "vtkSmartPointer.h" // For vtkSmartPointer
33
34VTK_ABI_NAMESPACE_BEGIN
35class vtkIdList;
36class vtkExtractCellsIdList;
37
38class VTKFILTERSCORE_EXPORT vtkExtractCells : public vtkUnstructuredGridAlgorithm
39{
40public:
42
46 void PrintSelf(ostream& os, vtkIndent indent) override;
49
56
62
68
70
73 void SetCellIds(const vtkIdType* ptr, vtkIdType numValues);
74 void AddCellIds(const vtkIdType* ptr, vtkIdType numValues);
76
78
84 vtkSetMacro(ExtractAllCells, bool);
85 vtkGetMacro(ExtractAllCells, bool);
86 vtkBooleanMacro(ExtractAllCells, bool);
88
90
95 vtkSetMacro(AssumeSortedAndUniqueIds, bool);
96 vtkGetMacro(AssumeSortedAndUniqueIds, bool);
97 vtkBooleanMacro(AssumeSortedAndUniqueIds, bool);
99
101
106 vtkSetMacro(PassThroughCellIds, bool);
107 vtkGetMacro(PassThroughCellIds, bool);
108 vtkBooleanMacro(PassThroughCellIds, bool);
110
112
117 vtkSetMacro(OutputPointsPrecision, int);
118 vtkGetMacro(OutputPointsPrecision, int);
120
122
130 vtkSetClampMacro(BatchSize, unsigned int, 1, VTK_INT_MAX);
131 vtkGetMacro(BatchSize, unsigned int);
133protected:
136
138 int FillInputPortInformation(int port, vtkInformation* info) override;
139 bool Copy(vtkDataSet* input, vtkUnstructuredGrid* output);
140
142 bool ExtractAllCells = false;
143 bool AssumeSortedAndUniqueIds = false;
144 bool PassThroughCellIds = true;
145 int OutputPointsPrecision = DEFAULT_PRECISION;
146 unsigned int BatchSize = 1000;
147
148private:
149 vtkExtractCells(const vtkExtractCells&) = delete;
150 void operator=(const vtkExtractCells&) = delete;
151};
152
153VTK_ABI_NAMESPACE_END
154#endif
abstract class to specify dataset behavior
Definition vtkDataSet.h:53
subset a vtkDataSet to create a vtkUnstructuredGrid
void SetCellIds(const vtkIdType *ptr, vtkIdType numValues)
Another way to provide ids using a pointer to vtkIdType array.
void SetCellList(vtkIdList *l)
Set the list of cell IDs that the output vtkUnstructuredGrid will be composed of.
~vtkExtractCells() override
void PrintSelf(ostream &os, vtkIndent indent) override
Standard methods for construction, type info, and printing.
vtkSmartPointer< vtkExtractCellsIdList > CellList
void AddCellList(vtkIdList *l)
Add the supplied list of cell IDs to those that will be included in the output vtkUnstructuredGrid.
int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *) override
This is called by the superclass.
void AddCellIds(const vtkIdType *ptr, vtkIdType numValues)
Another way to provide ids using a pointer to vtkIdType array.
void AddCellRange(vtkIdType from, vtkIdType to)
Add this range of cell IDs to those that will be included in the output vtkUnstructuredGrid.
bool Copy(vtkDataSet *input, vtkUnstructuredGrid *output)
int FillInputPortInformation(int port, vtkInformation *info) override
Fill the input port information objects for this algorithm.
static vtkExtractCells * New()
Standard methods for construction, type info, and printing.
list of point or cell ids
Definition vtkIdList.h:23
a simple class to control print indentation
Definition vtkIndent.h:29
Store zero or more vtkInformation instances.
Store vtkAlgorithm input/output information.
Hold a reference to a vtkObjectBase instance.
Superclass for algorithms that produce only unstructured grid as output.
dataset represents arbitrary combinations of all possible cell types
int vtkIdType
Definition vtkType.h:315
#define VTK_INT_MAX
Definition vtkType.h:144