VTK  9.2.6
vtkDataAssemblyUtilities.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkDataAssemblyUtilities.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 =========================================================================*/
26 #ifndef vtkDataAssemblyUtilities_h
27 #define vtkDataAssemblyUtilities_h
28 
29 #include "vtkCommonDataModelModule.h" // for export macros
30 #include "vtkObject.h"
31 #include "vtkSmartPointer.h" // for vtkSmartPointer
32 
33 #include <string> // for std::string
34 #include <vector> // for std::vector
35 
37 class vtkDataAssembly;
38 class vtkDataObject;
41 class vtkUniformGridAMR;
42 
43 class VTKCOMMONDATAMODEL_EXPORT vtkDataAssemblyUtilities : public vtkObject
44 {
45 public:
46  static vtkDataAssemblyUtilities* New();
48  void PrintSelf(ostream& os, vtkIndent indent) override;
49 
54  static const char* HierarchyName() { return "Hierarchy"; }
55 
61  static vtkSmartPointer<vtkDataAssembly> GetDataAssembly(
62  const char* name, vtkCompositeDataSet* cd);
63 
78  static bool GenerateHierarchy(vtkCompositeDataSet* input, vtkDataAssembly* hierarchy,
79  vtkPartitionedDataSetCollection* output = nullptr);
80 
92  static vtkSmartPointer<vtkCompositeDataSet> GenerateCompositeDataSetFromHierarchy(
94 
107  static std::vector<unsigned int> GetSelectedCompositeIds(
108  const std::vector<std::string>& selectors, vtkDataAssembly* hierarchyOrAssembly,
109  vtkPartitionedDataSetCollection* data = nullptr, bool leaf_nodes_only = false);
110 
112 
120  static std::string GetSelectorForCompositeId(unsigned int id, vtkDataAssembly* hierarchy);
121  static std::vector<std::string> GetSelectorsForCompositeIds(
122  const std::vector<unsigned int>& ids, vtkDataAssembly* hierarchy);
124 
125 protected:
127  ~vtkDataAssemblyUtilities() override;
128 
129  static bool GenerateHierarchyInternal(
131  static bool GenerateHierarchyInternal(vtkMultiBlockDataSet* input, vtkDataAssembly* hierarchy,
133  static bool GenerateHierarchyInternal(vtkPartitionedDataSetCollection* input,
135 
136 private:
138  void operator=(const vtkDataAssemblyUtilities&) = delete;
139 };
140 
141 #endif
abstract base class for most VTK objects
Definition: vtkObject.h:62
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
static const char * HierarchyName()
Returns the named used by VTK to correspond to a vtkDataAssembly associated with the structure of a c...
Hold a reference to a vtkObjectBase instance.
Definition: vtkMeta.h:32
abstract superclass for composite (multi-block or AMR) datasets
a simple class to control print indentation
Definition: vtkIndent.h:39
Composite dataset that organizes datasets into blocks.
collections of utilities for vtkDataAssembly
hierarchical representation to use with vtkPartitionedDataSetCollection
static vtkObject * New()
Create an object with Debug turned off, modified time initialized to zero, and reference counting on...
general representation of visualization data
Definition: vtkDataObject.h:65
a concrete implementation of vtkCompositeDataSet
Composite dataset that groups datasets as a collection.