VTK  9.3.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
23 #ifndef vtkExtractBlock_h
24 #define vtkExtractBlock_h
25 
26 #include "vtkFiltersExtractionModule.h" // For export macro
28 
29 VTK_ABI_NAMESPACE_BEGIN
33 class vtkDataObjectTree;
34 
35 class VTKFILTERSEXTRACTION_EXPORT vtkExtractBlock : public vtkPassInputTypeAlgorithm
36 {
37  class vtkSet;
38 
39 public:
41 
44  static vtkExtractBlock* New();
46  void PrintSelf(ostream& os, vtkIndent indent) override;
48 
50 
58  void AddIndex(unsigned int index);
59  void RemoveIndex(unsigned int index);
60  void RemoveAllIndices();
62 
64 
70  vtkSetMacro(PruneOutput, vtkTypeBool);
71  vtkGetMacro(PruneOutput, vtkTypeBool);
72  vtkBooleanMacro(PruneOutput, vtkTypeBool);
74 
76 
84  vtkSetMacro(MaintainStructure, vtkTypeBool);
85  vtkGetMacro(MaintainStructure, vtkTypeBool);
86  vtkBooleanMacro(MaintainStructure, vtkTypeBool);
88 
89 protected:
91  ~vtkExtractBlock() override;
92 
96  static vtkInformationIntegerKey* DONT_PRUNE();
97 
100  int FillInputPortInformation(int port, vtkInformation* info) override;
101 
103  void CopySubTree(vtkDataObjectTreeIterator* loc, vtkDataObjectTree* output,
104  vtkDataObjectTree* input, vtkSet& activeIndices);
105  bool Prune(vtkMultiBlockDataSet* mblock);
106  bool Prune(vtkPartitionedDataSet* mpiece);
107  bool Prune(vtkDataObject* branch);
108 
111 
112 private:
113  vtkExtractBlock(const vtkExtractBlock&) = delete;
114  void operator=(const vtkExtractBlock&) = delete;
115  vtkSet* Indices;
116 };
117 
118 VTK_ABI_NAMESPACE_END
119 #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:54
virtual int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *)
This is called within ProcessRequest when a request asks the algorithm to do its work.
static vtkPassInputTypeAlgorithm * New()