VTK  9.1.0
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 
60 #ifndef vtkExtractCells_h
61 #define vtkExtractCells_h
62 
63 #include "vtkFiltersExtractionModule.h" // For export macro
65 
66 class vtkIdList;
67 class vtkExtractCellsSTLCloak;
68 
69 class VTKFILTERSEXTRACTION_EXPORT vtkExtractCells : public vtkUnstructuredGridAlgorithm
70 {
71 public:
73 
77  void PrintSelf(ostream& os, vtkIndent indent) override;
78  static vtkExtractCells* New();
80 
87 
93 
99 
101 
104  void SetCellIds(const vtkIdType* ptr, vtkIdType numValues);
105  void AddCellIds(const vtkIdType* ptr, vtkIdType numValues);
107 
109 
115  vtkSetMacro(ExtractAllCells, bool);
116  vtkGetMacro(ExtractAllCells, bool);
117  vtkBooleanMacro(ExtractAllCells, bool);
119 
121 
126  vtkSetMacro(AssumeSortedAndUniqueIds, bool);
127  vtkGetMacro(AssumeSortedAndUniqueIds, bool);
128  vtkBooleanMacro(AssumeSortedAndUniqueIds, bool);
130 protected:
132  ~vtkExtractCells() override;
133 
136  bool Copy(vtkDataSet* input, vtkUnstructuredGrid* output);
137 
138  vtkExtractCellsSTLCloak* CellList = nullptr;
139  vtkIdType SubSetUGridCellArraySize = 0;
140  vtkIdType SubSetUGridFacesArraySize = 0;
141  bool ExtractAllCells = false;
142  bool AssumeSortedAndUniqueIds = false;
143 
144 private:
145  vtkExtractCells(const vtkExtractCells&) = delete;
146  void operator=(const vtkExtractCells&) = delete;
147 };
148 
149 #endif
vtkExtractCells
subset a vtkDataSet to create a vtkUnstructuredGrid
Definition: vtkExtractCells.h:70
vtkIdType
int vtkIdType
Definition: vtkType.h:332
vtkInformationVector
Store zero or more vtkInformation instances.
Definition: vtkInformationVector.h:145
vtkExtractCells::SetCellIds
void SetCellIds(const vtkIdType *ptr, vtkIdType numValues)
Another way to provide ids using a pointer to vtkIdType array.
vtkExtractCells::New
static vtkExtractCells * New()
Standard methods for construction, type info, and printing.
vtkExtractCells::~vtkExtractCells
~vtkExtractCells() override
vtkExtractCells::FillInputPortInformation
int FillInputPortInformation(int port, vtkInformation *info) override
Fill the input port information objects for this algorithm.
vtkExtractCells::SetCellList
void SetCellList(vtkIdList *l)
Set the list of cell IDs that the output vtkUnstructuredGrid will be composed of.
vtkX3D::port
@ port
Definition: vtkX3D.h:453
vtkExtractCells::Copy
bool Copy(vtkDataSet *input, vtkUnstructuredGrid *output)
vtkIndent
a simple class to control print indentation
Definition: vtkIndent.h:113
vtkIdList
list of point or cell ids
Definition: vtkIdList.h:140
vtkExtractCells::AddCellList
void AddCellList(vtkIdList *l)
Add the supplied list of cell IDs to those that will be included in the output vtkUnstructuredGrid.
vtkExtractCells::vtkExtractCells
vtkExtractCells()
vtkDataSet
abstract class to specify dataset behavior
Definition: vtkDataSet.h:166
vtkInformation
Store vtkAlgorithm input/output information.
Definition: vtkInformation.h:183
vtkX3D::info
@ info
Definition: vtkX3D.h:382
vtkExtractCells::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent) override
Standard methods for construction, type info, and printing.
vtkExtractCells::RequestData
int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *) override
This is called by the superclass.
vtkUnstructuredGridAlgorithm.h
vtkExtractCells::AddCellRange
void AddCellRange(vtkIdType from, vtkIdType to)
Add this range of cell IDs to those that will be included in the output vtkUnstructuredGrid.
vtkUnstructuredGridAlgorithm
Superclass for algorithms that produce only unstructured grid as output.
Definition: vtkUnstructuredGridAlgorithm.h:41
vtkUnstructuredGrid
dataset represents arbitrary combinations of all possible cell types
Definition: vtkUnstructuredGrid.h:204
vtkExtractCells::AddCellIds
void AddCellIds(const vtkIdType *ptr, vtkIdType numValues)
Another way to provide ids using a pointer to vtkIdType array.