VTK  9.2.5
vtkExtractBlock.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkExtractBlock.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 =========================================================================*/
35 #ifndef vtkExtractBlock_h
36 #define vtkExtractBlock_h
37 
38 #include "vtkFiltersExtractionModule.h" // For export macro
40 
44 class vtkDataObjectTree;
45 
46 class VTKFILTERSEXTRACTION_EXPORT vtkExtractBlock : public vtkPassInputTypeAlgorithm
47 {
48  class vtkSet;
49 
50 public:
52 
55  static vtkExtractBlock* New();
57  void PrintSelf(ostream& os, vtkIndent indent) override;
59 
61 
69  void AddIndex(unsigned int index);
70  void RemoveIndex(unsigned int index);
73 
75 
81  vtkSetMacro(PruneOutput, vtkTypeBool);
82  vtkGetMacro(PruneOutput, vtkTypeBool);
83  vtkBooleanMacro(PruneOutput, vtkTypeBool);
85 
87 
95  vtkSetMacro(MaintainStructure, vtkTypeBool);
96  vtkGetMacro(MaintainStructure, vtkTypeBool);
97  vtkBooleanMacro(MaintainStructure, vtkTypeBool);
99 
100 protected:
102  ~vtkExtractBlock() override;
103 
108 
112 
115  vtkDataObjectTree* input, vtkSet& activeIndices);
118  bool Prune(vtkDataObject* branch);
119 
122 
123 private:
124  vtkExtractBlock(const vtkExtractBlock&) = delete;
125  void operator=(const vtkExtractBlock&) = delete;
126  vtkSet* Indices;
127 };
128 
129 #endif
superclass for composite data iterators
provides implementation for most abstract methods in the superclass vtkCompositeDataSet
general representation of visualization data
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:119
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:382
@ port
Definition: vtkX3D.h:453
@ index
Definition: vtkX3D.h:252
int vtkTypeBool
Definition: vtkABI.h:69