VTK  9.1.0
ArrayConverters.h
Go to the documentation of this file.
1//=============================================================================
2//
3// Copyright (c) Kitware, Inc.
4// All rights reserved.
5// See LICENSE.txt for details.
6//
7// This software is distributed WITHOUT ANY WARRANTY; without even
8// the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
9// PURPOSE. See the above copyright notice for more information.
10//
11// Copyright 2012 Sandia Corporation.
12// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
13// the U.S. Government retains certain rights in this software.
14//
15//=============================================================================
16
17#ifndef vtkmlib_ArrayConverters_h
18#define vtkmlib_ArrayConverters_h
19
21
22#include "vtkAcceleratorsVTKmDataModelModule.h" //required for correct implementation
23#include "vtkmConfigDataModel.h" //required for general vtkm setup
24
27
28#include <vtkm/cont/ArrayHandleSOA.h>
29#include <vtkm/cont/Field.h>
30
31#include <type_traits> // for std::underlying_type
32
33class vtkDataArray;
34class vtkDataSet;
35class vtkPoints;
36
37namespace vtkm
38{
39namespace cont
40{
41class DataSet;
42class CoordinateSystem;
43}
44}
45
46namespace tovtkm
47{
48
49VTKACCELERATORSVTKMDATAMODEL_EXPORT
50void ProcessFields(vtkDataSet* input, vtkm::cont::DataSet& dataset, tovtkm::FieldsFlag fields);
51
52// determine the type and call the proper Convert routine
53VTKACCELERATORSVTKMDATAMODEL_EXPORT
54vtkm::cont::Field Convert(vtkDataArray* input, int association);
55}
56
57namespace fromvtkm
58{
59
60VTKACCELERATORSVTKMDATAMODEL_EXPORT
61bool ConvertArrays(const vtkm::cont::DataSet& input, vtkDataSet* output);
62}
63
64#endif // vtkmlib_ArrayConverters_h
abstract superclass for arrays of numeric data
Definition: vtkDataArray.h:159
abstract class to specify dataset behavior
Definition: vtkDataSet.h:166
represent and manipulate 3D points
Definition: vtkPoints.h:143
VTKACCELERATORSVTKMDATAMODEL_EXPORT bool ConvertArrays(const vtkm::cont::DataSet &input, vtkDataSet *output)
VTKACCELERATORSVTKMDATAMODEL_EXPORT void ProcessFields(vtkDataSet *input, vtkm::cont::DataSet &dataset, tovtkm::FieldsFlag fields)
VTKACCELERATORSVTKMDATAMODEL_EXPORT vtkm::cont::Field Convert(vtkDataArray *input, int association)
std::map< std::string, DataArray > DataSet
key: variable name, value: DataArray
Definition: VTXTypes.h:39