VTK  9.3.0
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);
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 
97 
101 
104  vtkDataObjectTree* input, vtkSet& activeIndices);
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
superclass for composite data iterators
provides implementation for most abstract methods in the superclass vtkCompositeDataSet
general representation of visualization data
Definition: vtkDataObject.h:55
extracts blocks from a vtkDataObjectTree subclass.
void AddIndex(unsigned int index)
Select the block indices to extract.
bool Prune(vtkPartitionedDataSet *mpiece)
void RemoveAllIndices()
Standard methods for instantiation, type information, and printing.
void CopySubTree(vtkDataObjectTreeIterator *loc, vtkDataObjectTree *output, vtkDataObjectTree *input, vtkSet &activeIndices)
Extract subtree.
static vtkInformationIntegerKey * DONT_PRUNE()
Internal key, used to avoid pruning of a branch.
int FillInputPortInformation(int port, vtkInformation *info) override
Fill the input port information objects for this algorithm.
int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *) override
Implementation of the algorithm.
static vtkExtractBlock * New()
Standard methods for instantiation, type information, and printing.
vtkTypeBool MaintainStructure
~vtkExtractBlock() override
vtkTypeBool PruneOutput
void PrintSelf(ostream &os, vtkIndent indent) override
Standard methods for instantiation, type information, and printing.
void RemoveIndex(unsigned int index)
Standard methods for instantiation, type information, and printing.
bool Prune(vtkDataObject *branch)
bool Prune(vtkMultiBlockDataSet *mblock)
a simple class to control print indentation
Definition: vtkIndent.h:29
Key for integer values in vtkInformation.
Store zero or more vtkInformation instances.
Store vtkAlgorithm input/output information.
Composite dataset that organizes datasets into blocks.
composite dataset to encapsulates a dataset consisting of partitions.
Superclass for algorithms that produce output of the same type as input.
@ info
Definition: vtkX3D.h:376
@ port
Definition: vtkX3D.h:447
@ index
Definition: vtkX3D.h:246
int vtkTypeBool
Definition: vtkABI.h:64