VTK  9.7.1
vtkExtractBlock.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
25 #ifndef vtkExtractBlock_h
26 #define vtkExtractBlock_h
27 
28 #include "vtkFiltersExtractionModule.h" // For export macro
30 
31 VTK_ABI_NAMESPACE_BEGIN
35 class vtkDataObjectTree;
36 
37 class VTKFILTERSEXTRACTION_EXPORT vtkExtractBlock : public vtkPassInputTypeAlgorithm
38 {
39  class vtkSet;
40 
41 public:
43 
46  static vtkExtractBlock* New();
48  void PrintSelf(ostream& os, vtkIndent indent) override;
50 
52 
60  void AddIndex(unsigned int index);
61  void RemoveIndex(unsigned int index);
62  void RemoveAllIndices();
64 
66 
72  vtkSetMacro(PruneOutput, vtkTypeBool);
73  vtkGetMacro(PruneOutput, vtkTypeBool);
74  vtkBooleanMacro(PruneOutput, vtkTypeBool);
76 
78 
86  vtkSetMacro(MaintainStructure, vtkTypeBool);
87  vtkGetMacro(MaintainStructure, vtkTypeBool);
88  vtkBooleanMacro(MaintainStructure, vtkTypeBool);
90 
91 protected:
93  ~vtkExtractBlock() override;
94 
98  static vtkInformationIntegerKey* DONT_PRUNE();
99 
102  int FillInputPortInformation(int port, vtkInformation* info) override;
103 
105  void CopySubTree(vtkDataObjectTreeIterator* loc, vtkDataObjectTree* output,
106  vtkDataObjectTree* input, vtkSet& activeIndices);
107  bool Prune(vtkMultiBlockDataSet* mblock);
108  bool Prune(vtkPartitionedDataSet* mpiece);
109  bool Prune(vtkDataObject* branch);
110 
113 
114 private:
115  vtkExtractBlock(const vtkExtractBlock&) = delete;
116  void operator=(const vtkExtractBlock&) = delete;
117  vtkSet* Indices;
118 };
119 
120 VTK_ABI_NAMESPACE_END
121 #endif
composite dataset to encapsulates a dataset consisting of partitions.
Superclass for algorithms that produce output of the same type as input.
provides implementation for most abstract methods in the superclass vtkCompositeDataSet ...
Store vtkAlgorithm input/output information.
extracts blocks from a vtkDataObjectTree subclass.
vtkTypeBool MaintainStructure
vtkTypeBool PruneOutput
int vtkTypeBool
Definition: vtkABI.h:64
a simple class to control print indentation
Definition: vtkIndent.h:28
Key for integer values in vtkInformation.
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.
Composite dataset that organizes datasets into blocks.
Store zero or more vtkInformation instances.
superclass for composite data iterators
general representation of visualization data
Definition: vtkDataObject.h:55
virtual int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *)
This is called within ProcessRequest when a request asks the algorithm to do its work.
static vtkPassInputTypeAlgorithm * New()