VTK  9.2.6
vtkExtractCells.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkExtractCells.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 =========================================================================*/
15 /*----------------------------------------------------------------------------
16  Copyright (c) Sandia Corporation
17  See Copyright.txt or http://www.paraview.org/HTML/Copyright.html for details.
18 ----------------------------------------------------------------------------*/
19 
34 #ifndef vtkExtractCells_h
35 #define vtkExtractCells_h
36 
37 #include "vtkFiltersExtractionModule.h" // For export macro
39 
40 class vtkIdList;
41 class vtkExtractCellsSTLCloak;
42 
43 class VTKFILTERSEXTRACTION_EXPORT vtkExtractCells : public vtkUnstructuredGridAlgorithm
44 {
45 public:
47 
51  void PrintSelf(ostream& os, vtkIndent indent) override;
52  static vtkExtractCells* New();
54 
60  void SetCellList(vtkIdList* l);
61 
66  void AddCellList(vtkIdList* l);
67 
72  void AddCellRange(vtkIdType from, vtkIdType to);
73 
75 
78  void SetCellIds(const vtkIdType* ptr, vtkIdType numValues);
79  void AddCellIds(const vtkIdType* ptr, vtkIdType numValues);
81 
83 
89  vtkSetMacro(ExtractAllCells, bool);
90  vtkGetMacro(ExtractAllCells, bool);
91  vtkBooleanMacro(ExtractAllCells, bool);
93 
95 
100  vtkSetMacro(AssumeSortedAndUniqueIds, bool);
101  vtkGetMacro(AssumeSortedAndUniqueIds, bool);
102  vtkBooleanMacro(AssumeSortedAndUniqueIds, bool);
104 protected:
105  vtkExtractCells();
106  ~vtkExtractCells() override;
107 
109  int FillInputPortInformation(int port, vtkInformation* info) override;
110  bool Copy(vtkDataSet* input, vtkUnstructuredGrid* output);
111 
112  vtkExtractCellsSTLCloak* CellList = nullptr;
113  vtkIdType SubSetUGridCellArraySize = 0;
114  vtkIdType SubSetUGridFacesArraySize = 0;
115  bool ExtractAllCells = false;
116  bool AssumeSortedAndUniqueIds = false;
117 
118 private:
119  vtkExtractCells(const vtkExtractCells&) = delete;
120  void operator=(const vtkExtractCells&) = delete;
121 };
122 
123 #endif
virtual int RequestData(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector)
This is called by the superclass.
Store vtkAlgorithm input/output information.
abstract class to specify dataset behavior
Definition: vtkDataSet.h:62
static vtkUnstructuredGridAlgorithm * New()
int vtkIdType
Definition: vtkType.h:332
int FillInputPortInformation(int port, vtkInformation *info) override
Fill the input port information objects for this algorithm.
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:39
list of point or cell ids
Definition: vtkIdList.h:33
dataset represents arbitrary combinations of all possible cell types
Superclass for algorithms that produce only unstructured grid as output.
Store zero or more vtkInformation instances.
subset a vtkDataSet to create a vtkUnstructuredGrid