VTK  9.2.6
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);
71  void RemoveAllIndices();
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:
101  vtkExtractBlock();
102  ~vtkExtractBlock() override;
103 
107  static vtkInformationIntegerKey* DONT_PRUNE();
108 
111  int FillInputPortInformation(int port, vtkInformation* info) override;
112 
114  void CopySubTree(vtkDataObjectTreeIterator* loc, vtkDataObjectTree* output,
115  vtkDataObjectTree* input, vtkSet& activeIndices);
116  bool Prune(vtkMultiBlockDataSet* mblock);
117  bool Prune(vtkPartitionedDataSet* mpiece);
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
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:69
a simple class to control print indentation
Definition: vtkIndent.h:39
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:65
virtual int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *)
This is called within ProcessRequest when a request asks the algorithm to do its work.
static vtkPassInputTypeAlgorithm * New()