VTK  9.3.1
vtkExtractCellsByType.h
Go to the documentation of this file.
1 // SPDX-FileCopyrightText: Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
2 // SPDX-License-Identifier: BSD-3-Clause
3 
38 #ifndef vtkExtractCellsByType_h
39 #define vtkExtractCellsByType_h
40 
41 #include "vtkDataSetAlgorithm.h"
42 #include "vtkFiltersExtractionModule.h" // For export macro
43 
44 VTK_ABI_NAMESPACE_BEGIN
45 struct vtkCellTypeSet;
46 class vtkIdTypeArray;
47 
48 class VTKFILTERSEXTRACTION_EXPORT vtkExtractCellsByType : public vtkDataSetAlgorithm
49 {
50 public:
52 
55  static vtkExtractCellsByType* New();
57  void PrintSelf(ostream& os, vtkIndent indent) override;
59 
61 
66  void AddCellType(unsigned int type);
67  void AddAllCellTypes();
68  void RemoveCellType(unsigned int type);
69  void RemoveAllCellTypes();
70  bool ExtractCellType(unsigned int type);
72 
73 protected:
76 
77  void ExtractUnstructuredData(vtkDataSet* inDS, vtkDataSet* outDS);
78  void ExtractPolyDataCells(
79  vtkDataSet* inDS, vtkDataSet* outDS, vtkIdType* ptMap, vtkIdType& numNewPts);
80  void ExtractUnstructuredGridCells(
81  vtkDataSet* inDS, vtkDataSet* outDS, vtkIdType* ptMap, vtkIdType& numNewPts);
82 
84  ~vtkExtractCellsByType() override;
85 
86 private:
88  void operator=(const vtkExtractCellsByType&) = delete;
89 
90  vtkCellTypeSet* CellTypes;
91 };
92 
93 VTK_ABI_NAMESPACE_END
94 #endif
Store vtkAlgorithm input/output information.
abstract class to specify dataset behavior
Definition: vtkDataSet.h:52
dynamic, self-adjusting array of vtkIdType
int vtkIdType
Definition: vtkType.h:315
extract cells of a specified type
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
a simple class to control print indentation
Definition: vtkIndent.h:28
virtual int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *)
This is called within ProcessRequest when a request asks the algorithm to do its work.
Store zero or more vtkInformation instances.
Superclass for algorithms that produce output of the same type as input.
static vtkDataSetAlgorithm * New()
int FillInputPortInformation(int port, vtkInformation *info) override
Fill the input port information objects for this algorithm.