VTK  9.0.1
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 =========================================================================*/
30 #ifndef vtkExtractBlock_h
31 #define vtkExtractBlock_h
32 
33 #include "vtkFiltersExtractionModule.h" // For export macro
35 
38 
39 class VTKFILTERSEXTRACTION_EXPORT vtkExtractBlock : public vtkMultiBlockDataSetAlgorithm
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);
64 
66 
70  vtkSetMacro(PruneOutput, vtkTypeBool);
71  vtkGetMacro(PruneOutput, vtkTypeBool);
72  vtkBooleanMacro(PruneOutput, vtkTypeBool);
74 
76 
82  vtkSetMacro(MaintainStructure, vtkTypeBool);
83  vtkGetMacro(MaintainStructure, vtkTypeBool);
84  vtkBooleanMacro(MaintainStructure, vtkTypeBool);
86 
87 protected:
89  ~vtkExtractBlock() override;
90 
95 
98 
104  bool Prune(vtkDataObject* mblock);
105 
108 
109 private:
110  vtkExtractBlock(const vtkExtractBlock&) = delete;
111  void operator=(const vtkExtractBlock&) = delete;
112 
113  class vtkSet;
114  vtkSet* Indices;
115  vtkSet* ActiveIndices;
116 };
117 
118 #endif
superclass for composite data iterators
general representation of visualization data
Definition: vtkDataObject.h:60
extracts blocks from a multiblock dataset.
void AddIndex(unsigned int index)
Select the block indices to extract.
bool Prune(vtkDataObject *mblock)
void RemoveAllIndices()
static vtkInformationIntegerKey * DONT_PRUNE()
Internal key, used to avoid pruning of a branch.
int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *) override
Implementation of the algorithm.
static vtkExtractBlock * New()
Standard methods for instantiation, type information, and printing.
void CopySubTree(vtkDataObjectTreeIterator *loc, vtkMultiBlockDataSet *output, vtkMultiBlockDataSet *input)
Extract subtree.
vtkTypeBool MaintainStructure
~vtkExtractBlock() override
vtkTypeBool PruneOutput
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
void RemoveIndex(unsigned int index)
bool Prune(vtkMultiPieceDataSet *mblock)
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.
Superclass for algorithms that produce only vtkMultiBlockDataSet as output.
Composite dataset that organizes datasets into blocks.
composite dataset to encapsulates pieces of dataset.
@ index
Definition: vtkX3D.h:252
int vtkTypeBool
Definition: vtkABI.h:69