VTK  9.2.6
DataSetConverters.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_DataSetConverters_h
18 #define vtkmlib_DataSetConverters_h
19 
20 #include "vtkAcceleratorsVTKmDataModelModule.h"
21 
22 #include "ArrayConverters.h" // for FieldsFlag
23 
24 #include "vtkmConfigDataModel.h" //required for general vtkm setup
25 
26 #include <vtkm/cont/DataSet.h>
27 
28 class vtkDataSet;
30 class vtkImageData;
31 class vtkPoints;
32 class vtkRectilinearGrid;
33 class vtkStructuredGrid;
34 
35 namespace tovtkm
36 {
37 
38 // convert a vtkPoints array into a coordinate system
39 VTKACCELERATORSVTKMDATAMODEL_EXPORT
40 vtkm::cont::CoordinateSystem Convert(vtkPoints* points);
41 
42 // convert an structured grid type
43 VTKACCELERATORSVTKMDATAMODEL_EXPORT
45 
46 // convert a rectilinear grid type
47 VTKACCELERATORSVTKMDATAMODEL_EXPORT
49 
50 // determine the type and call the proper Convert routine
51 VTKACCELERATORSVTKMDATAMODEL_EXPORT
53 }
54 
55 namespace fromvtkm
56 {
57 
58 VTKACCELERATORSVTKMDATAMODEL_EXPORT
60 
61 VTKACCELERATORSVTKMDATAMODEL_EXPORT
62 bool Convert(const vtkm::cont::DataSet& vtkmOut, vtkRectilinearGrid* output, vtkDataSet* input);
63 
64 VTKACCELERATORSVTKMDATAMODEL_EXPORT
65 bool Convert(const vtkm::cont::DataSet& vtkmOut, vtkStructuredGrid* output, vtkDataSet* input);
66 
67 }
68 
69 #endif // vtkmlib_DataSetConverters_h
a dataset that is topologically regular with variable spacing in the three coordinate directions ...
abstract class to specify dataset behavior
Definition: vtkDataSet.h:62
topologically and geometrically regular array of data
Definition: vtkImageData.h:53
VTKACCELERATORSVTKMCORE_EXPORT vtkDataArray * Convert(const vtkm::cont::Field &input)
VTKACCELERATORSVTKMDATAMODEL_EXPORT void PassAttributesInformation(vtkDataSetAttributes *input, vtkDataSetAttributes *output)
std::map< std::string, DataArray > DataSet
key: variable name, value: DataArray
Definition: VTXTypes.h:39
represent and manipulate attribute data in a dataset
VTKACCELERATORSVTKMDATAMODEL_EXPORT vtkm::cont::Field Convert(vtkDataArray *input, int association)
topologically regular array of data
represent and manipulate 3D points
Definition: vtkPoints.h:39