VTK  9.2.6
vtkConduitArrayUtilities.h
Go to the documentation of this file.
1/*=========================================================================
2
3 Program: Visualization Toolkit
4 Module: vtkConduitArrayUtilities.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=========================================================================*/
28#ifndef vtkConduitArrayUtilities_h
29#define vtkConduitArrayUtilities_h
30
31#include "vtkIOCatalystConduitModule.h" // for exports
32#include "vtkObject.h"
33#include "vtkSmartPointer.h" // for vtkSmartPointer
34#include <string> // for std::string
35
36class vtkCellArray;
37class vtkDataArray;
38
39extern "C"
40{
41 typedef void conduit_node;
42}
43
44class VTKIOCATALYSTCONDUIT_EXPORT vtkConduitArrayUtilities : public vtkObject
45{
46public:
49 void PrintSelf(ostream& os, vtkIndent indent) override;
50
52
57 const conduit_node* mcarray, const std::string& arrayname);
59
67 vtkIdType cellSize, const conduit_node* mcarray);
68
74 vtkDataArray* array, int num_components);
75
80 const conduit_node* o2mrelation, const std::string& leafname);
81
82protected:
85
87 const conduit_node* mcarray, bool force_signed);
89 const conduit_node* mcarray, bool force_signed);
91 const conduit_node* mcarray, bool force_signed);
92
93private:
95 void operator=(const vtkConduitArrayUtilities&) = delete;
96};
97
98#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)
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:34
abstract base class for most VTK objects
Definition vtkObject.h:57
Hold a reference to a vtkObjectBase instance.
void conduit_node
int vtkIdType
Definition vtkType.h:332