VTK
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 
20 #include "vtkAcceleratorsVTKmModule.h" //required for correct implementation
21 #include "vtkmConfig.h" //required for general vtkm setup
22 
23 #include <vtkm/cont/Field.h>
24 
25 class vtkDataArray;
26 class vtkDataSet;
27 class vtkPoints;
28 
29 namespace vtkm {
30 namespace cont {
31 class DataSet;
32 class CoordinateSystem;
33 }
34 }
35 
36 namespace tovtkm {
37 
38 // determine the type and call the proper Convert routine
39 VTKACCELERATORSVTKM_EXPORT
40 vtkm::cont::Field Convert(vtkDataArray* input, int association);
41 }
42 
43 namespace fromvtkm {
44 
45 VTKACCELERATORSVTKM_EXPORT
46 vtkDataArray* Convert(const vtkm::cont::Field& input);
47 
48 VTKACCELERATORSVTKM_EXPORT
49 vtkPoints* Convert(const vtkm::cont::CoordinateSystem& input);
50 
51 VTKACCELERATORSVTKM_EXPORT
52 bool ConvertArrays(const vtkm::cont::DataSet& input, vtkDataSet* output);
53 }
54 
55 #endif // vtkmlib_ArrayConverters_h
VTKACCELERATORSVTKM_EXPORT bool ConvertArrays(const vtkm::cont::DataSet &input, vtkDataSet *output)
abstract class to specify dataset behavior
Definition: vtkDataSet.h:56
VTKACCELERATORSVTKM_EXPORT vtkDataArray * Convert(const vtkm::cont::Field &input)
abstract superclass for arrays of numeric data
Definition: vtkDataArray.h:48
represent and manipulate 3D points
Definition: vtkPoints.h:33
VTKACCELERATORSVTKM_EXPORT vtkm::cont::Field Convert(vtkDataArray *input, int association)