VTK  9.3.0
vtkConduitArrayUtilities.h
Go to the documentation of this file.
1// SPDX-FileCopyrightText: Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
2// SPDX-License-Identifier: BSD-3-Clause
16#ifndef vtkConduitArrayUtilities_h
17#define vtkConduitArrayUtilities_h
18
19#include "vtkIOCatalystConduitModule.h" // for exports
20#include "vtkObject.h"
21#include "vtkSmartPointer.h" // for vtkSmartPointer
22
23#include "conduit.h" // for conduit_node
24
25#include <string> // for std::string
26
27VTK_ABI_NAMESPACE_BEGIN
28class vtkCellArray;
29class vtkDataArray;
30
31class VTKIOCATALYSTCONDUIT_EXPORT vtkConduitArrayUtilities : public vtkObject
32{
33public:
36 void PrintSelf(ostream& os, vtkIndent indent) override;
37
39
42 static vtkSmartPointer<vtkDataArray> MCArrayToVTKArray(const conduit_node* mcarray);
44 const conduit_node* mcarray, const std::string& arrayname);
46
54 vtkIdType cellSize, const conduit_node* mcarray);
55
61 vtkDataArray* array, int num_components);
62
67 const conduit_node* o2mrelation, const std::string& leafname);
68
69protected:
72
74 const conduit_node* mcarray, bool force_signed);
76 const conduit_node* mcarray, bool force_signed);
78 const conduit_node* mcarray, bool force_signed);
79
80private:
82 void operator=(const vtkConduitArrayUtilities&) = delete;
83};
84VTK_ABI_NAMESPACE_END
85
86#endif
object to represent cell connectivity
helper to convert Conduit arrays to VTK arrays.
static vtkSmartPointer< vtkDataArray > MCArrayToVTKSOAArray(const conduit_node *mcarray, bool force_signed)
static vtkConduitArrayUtilities * New()
static vtkSmartPointer< vtkDataArray > MCArrayToVTKAOSArray(const conduit_node *mcarray, bool force_signed)
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
static vtkSmartPointer< vtkDataArray > SetNumberOfComponents(vtkDataArray *array, int num_components)
If the number of components in the array does not match the target, a new array is created.
static vtkSmartPointer< vtkDataArray > MCArrayToVTKArrayImpl(const conduit_node *mcarray, bool force_signed)
static vtkSmartPointer< vtkCellArray > O2MRelationToVTKCellArray(const conduit_node *o2mrelation, const std::string &leafname)
Read a O2MRelation element.
static vtkSmartPointer< vtkDataArray > MCArrayToVTKArray(const conduit_node *mcarray, const std::string &arrayname)
Returns a vtkDataArray from a conduit node in the conduit mcarray protocol.
static vtkSmartPointer< vtkDataArray > MCArrayToVTKArray(const conduit_node *mcarray)
Returns a vtkDataArray from a conduit node in the conduit mcarray protocol.
static vtkSmartPointer< vtkCellArray > MCArrayToVTKCellArray(vtkIdType cellSize, const conduit_node *mcarray)
Converts an mcarray to vtkCellArray.
~vtkConduitArrayUtilities() override
abstract superclass for arrays of numeric data
a simple class to control print indentation
Definition vtkIndent.h:29
abstract base class for most VTK objects
Definition vtkObject.h:49
Hold a reference to a vtkObjectBase instance.
int vtkIdType
Definition vtkType.h:315