VTK  9.0.20210424
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 =========================================================================*/
23 #ifndef vtkDataAssemblyUtilities_h
24 #define vtkDataAssemblyUtilities_h
25 
26 #include "vtkCommonDataModelModule.h" // for export macros
27 #include "vtkObject.h"
28 #include "vtkSmartPointer.h" // for vtkSmartPointer
29 
30 #include <string> // for std::string
31 #include <vector> // for std::vector
32 
34 class vtkDataAssembly;
35 class vtkDataObject;
38 class vtkUniformGridAMR;
39 
40 class VTKCOMMONDATAMODEL_EXPORT vtkDataAssemblyUtilities : public vtkObject
41 {
42 public:
45  void PrintSelf(ostream& os, vtkIndent indent) override;
46 
51  static const char* HierarchyName() { return "Hierarchy"; }
52 
59  const char* name, vtkCompositeDataSet* cd);
60 
75  static bool GenerateHierarchy(vtkCompositeDataSet* input, vtkDataAssembly* hierarchy,
76  vtkPartitionedDataSetCollection* output = nullptr);
77 
91 
104  static std::vector<unsigned int> GetSelectedCompositeIds(
105  const std::vector<std::string>& selectors, vtkDataAssembly* hierarchyOrAssembly,
106  vtkPartitionedDataSetCollection* data = nullptr, bool leaf_nodes_only = false);
107 
112  static std::string GetSelectorForCompositeId(unsigned int id, vtkDataAssembly* hierarchy);
113 
114 protected:
117 
124 
125 private:
127  void operator=(const vtkDataAssemblyUtilities&) = delete;
128 };
129 
130 #endif
vtkDataAssembly
hierarchical representation to use with vtkPartitionedDataSetCollection
Definition: vtkDataAssembly.h:131
vtkDataAssemblyUtilities::GenerateHierarchyInternal
static bool GenerateHierarchyInternal(vtkUniformGridAMR *input, vtkDataAssembly *hierarchy, vtkPartitionedDataSetCollection *output)
vtkX3D::data
@ data
Definition: vtkX3D.h:321
vtkDataAssemblyUtilities::GenerateHierarchyInternal
static bool GenerateHierarchyInternal(vtkMultiBlockDataSet *input, vtkDataAssembly *hierarchy, vtkPartitionedDataSetCollection *output)
vtkSmartPointer
Hold a reference to a vtkObjectBase instance.
Definition: vtkSmartPointer.h:36
vtkObject
abstract base class for most VTK objects
Definition: vtkObject.h:63
vtkDataAssemblyUtilities::HierarchyName
static const char * HierarchyName()
Returns the named used by VTK to correspond to a vtkDataAssembly associated with the structure of a c...
Definition: vtkDataAssemblyUtilities.h:51
vtkDataAssemblyUtilities
collections of utilities for vtkDataAssembly
Definition: vtkDataAssemblyUtilities.h:41
vtkDataAssemblyUtilities::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
vtkMultiBlockDataSet
Composite dataset that organizes datasets into blocks.
Definition: vtkMultiBlockDataSet.h:46
vtkCompositeDataSet
abstract superclass for composite (multi-block or AMR) datasets
Definition: vtkCompositeDataSet.h:49
vtkDataAssemblyUtilities::GetSelectedCompositeIds
static std::vector< unsigned int > GetSelectedCompositeIds(const std::vector< std::string > &selectors, vtkDataAssembly *hierarchyOrAssembly, vtkPartitionedDataSetCollection *data=nullptr, bool leaf_nodes_only=false)
Given a vtkDataAssembly and collection of selectors, returns a list of selected composite indices for...
vtkDataAssemblyUtilities::~vtkDataAssemblyUtilities
~vtkDataAssemblyUtilities() override
vtkDataAssemblyUtilities::GetDataAssembly
static vtkSmartPointer< vtkDataAssembly > GetDataAssembly(const char *name, vtkCompositeDataSet *cd)
Convenience method to get a named vtkDataAssembly from a vtkCompositeDataSet, if available.
vtkDataAssemblyUtilities::GenerateHierarchy
static bool GenerateHierarchy(vtkCompositeDataSet *input, vtkDataAssembly *hierarchy, vtkPartitionedDataSetCollection *output=nullptr)
Populates hierarchy with a representation of the hierarchy for the given composite dataset input.
vtkDataAssemblyUtilities::New
static vtkDataAssemblyUtilities * New()
vtkIndent
a simple class to control print indentation
Definition: vtkIndent.h:34
vtkSmartPointer.h
vtkX3D::name
@ name
Definition: vtkX3D.h:225
vtkObject.h
vtkX3D::string
@ string
Definition: vtkX3D.h:496
vtkDataAssemblyUtilities::vtkDataAssemblyUtilities
vtkDataAssemblyUtilities()
vtkUniformGridAMR
Definition: vtkUniformGridAMR.h:33
vtkPartitionedDataSetCollection
Composite dataset that groups datasets as a collection.
Definition: vtkPartitionedDataSetCollection.h:38
vtkDataAssemblyUtilities::GetSelectorForCompositeId
static std::string GetSelectorForCompositeId(unsigned int id, vtkDataAssembly *hierarchy)
For a vtkDataAssembly representing an hierarchy, returns the selector for the given composite id.
vtkDataObject
general representation of visualization data
Definition: vtkDataObject.h:60
vtkDataAssemblyUtilities::GenerateCompositeDataSetFromHierarchy
static vtkSmartPointer< vtkCompositeDataSet > GenerateCompositeDataSetFromHierarchy(vtkPartitionedDataSetCollection *input, vtkDataAssembly *hierarchy)
Inverse of GenerateHierarchy.
vtkDataAssemblyUtilities::GenerateHierarchyInternal
static bool GenerateHierarchyInternal(vtkPartitionedDataSetCollection *input, vtkDataAssembly *hierarchy, vtkPartitionedDataSetCollection *output)