vtkConduitArrayUtilities.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: ParaView
4  Module: vtkConduitArrayUtilities.h
5 
6  Copyright (c) Kitware, Inc.
7  All rights reserved.
8  See Copyright.txt or http://www.paraview.org/HTML/Copyright.html 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 "vtkObject.h"
32 #include "vtkPVVTKExtensionsConduitModule.h" // for exports
33 #include "vtkSmartPointer.h" // for vtkSmartPointer
34 #include <string> // for std::string
35 
36 class vtkCellArray;
38 
39 extern "C" {
40 typedef void conduit_node;
41 }
42 
44 {
45 public:
46  static vtkConduitArrayUtilities* New();
48  void PrintSelf(ostream& os, vtkIndent indent) override;
49 
51 
54  static vtkSmartPointer<vtkDataArray> MCArrayToVTKArray(const conduit_node* mcarray);
55  static vtkSmartPointer<vtkDataArray> MCArrayToVTKArray(
56  const conduit_node* mcarray, const std::string& arrayname);
58 
65  static vtkSmartPointer<vtkCellArray> MCArrayToVTKCellArray(
66  vtkIdType cellSize, const conduit_node* mcarray);
67 
72  static vtkSmartPointer<vtkDataArray> SetNumberOfComponents(
73  vtkDataArray* array, int num_components);
74 
75 protected:
78 
79  static vtkSmartPointer<vtkDataArray> MCArrayToVTKArrayImpl(
80  const conduit_node* mcarray, bool force_signed);
81  static vtkSmartPointer<vtkDataArray> MCArrayToVTKAOSArray(
82  const conduit_node* mcarray, bool force_signed);
83  static vtkSmartPointer<vtkDataArray> MCArrayToVTKSOAArray(
84  const conduit_node* mcarray, bool force_signed);
85 
86 private:
88  void operator=(const vtkConduitArrayUtilities&) = delete;
89 };
90 
91 #endif
void PrintSelf(ostream &os, vtkIndent indent) VTK_OVERRIDE
int vtkIdType
#define VTKPVVTKEXTENSIONSCONDUIT_EXPORT
helper to convert Conduit arrays to VTK arrays.
void conduit_node
static vtkObject * New()
void operator=(const vtkObjectBase &)