VTK  9.1.0
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 =========================================================================*/
32 #ifndef vtkExtractBlock_h
33 #define vtkExtractBlock_h
34 
35 #include "vtkFiltersExtractionModule.h" // For export macro
37 
41 class vtkDataObjectTree;
42 
43 class VTKFILTERSEXTRACTION_EXPORT vtkExtractBlock : public vtkPassInputTypeAlgorithm
44 {
45  class vtkSet;
46 
47 public:
49 
52  static vtkExtractBlock* New();
54  void PrintSelf(ostream& os, vtkIndent indent) override;
56 
58 
66  void AddIndex(unsigned int index);
67  void RemoveIndex(unsigned int index);
70 
72 
78  vtkSetMacro(PruneOutput, vtkTypeBool);
79  vtkGetMacro(PruneOutput, vtkTypeBool);
80  vtkBooleanMacro(PruneOutput, vtkTypeBool);
82 
84 
92  vtkSetMacro(MaintainStructure, vtkTypeBool);
93  vtkGetMacro(MaintainStructure, vtkTypeBool);
94  vtkBooleanMacro(MaintainStructure, vtkTypeBool);
96 
97 protected:
99  ~vtkExtractBlock() override;
100 
105 
109 
112  vtkDataObjectTree* input, vtkSet& activeIndices);
115  bool Prune(vtkDataObject* branch);
116 
119 
120 private:
121  vtkExtractBlock(const vtkExtractBlock&) = delete;
122  void operator=(const vtkExtractBlock&) = delete;
123  vtkSet* Indices;
124 };
125 
126 #endif
superclass for composite data iterators
provides implementation for most abstract methods in the superclass vtkCompositeDataSet
general representation of visualization data
Definition: vtkDataObject.h:60
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:34
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