VTK  9.3.20240327
DataSetConverters.h
Go to the documentation of this file.
1 // SPDX-FileCopyrightText: Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
2 // SPDX-FileCopyrightText: Copyright (c) Kitware, Inc.
3 // SPDX-FileCopyrightText: Copyright 2012 Sandia Corporation.
4 // SPDX-License-Identifier: LicenseRef-BSD-3-Clause-Sandia-USGov
5 
6 #ifndef vtkmlib_DataSetConverters_h
7 #define vtkmlib_DataSetConverters_h
8 
9 #include "vtkAcceleratorsVTKmDataModelModule.h"
10 
11 #include "ArrayConverters.h" // for FieldsFlag
12 
13 #include "vtkmConfigDataModel.h" //required for general vtkm setup
14 
15 #include <vtkm/cont/DataSet.h>
16 
17 VTK_ABI_NAMESPACE_BEGIN
18 class vtkDataSet;
20 class vtkImageData;
21 class vtkPoints;
22 class vtkRectilinearGrid;
23 class vtkStructuredGrid;
24 VTK_ABI_NAMESPACE_END
25 
26 namespace tovtkm
27 {
28 VTK_ABI_NAMESPACE_BEGIN
29 
30 // convert a vtkPoints array into a coordinate system
31 VTKACCELERATORSVTKMDATAMODEL_EXPORT
32 vtkm::cont::CoordinateSystem Convert(vtkPoints* points);
33 
34 // convert an structured grid type
35 VTKACCELERATORSVTKMDATAMODEL_EXPORT
37 
38 // convert a rectilinear grid type
39 VTKACCELERATORSVTKMDATAMODEL_EXPORT
41 
42 // determine the type and call the proper Convert routine
43 VTKACCELERATORSVTKMDATAMODEL_EXPORT
45 VTK_ABI_NAMESPACE_END
46 }
47 
48 namespace fromvtkm
49 {
50 VTK_ABI_NAMESPACE_BEGIN
51 
52 VTKACCELERATORSVTKMDATAMODEL_EXPORT
54 
55 VTKACCELERATORSVTKMDATAMODEL_EXPORT
56 bool Convert(const vtkm::cont::DataSet& vtkmOut, vtkRectilinearGrid* output, vtkDataSet* input);
57 
58 VTKACCELERATORSVTKMDATAMODEL_EXPORT
59 bool Convert(const vtkm::cont::DataSet& vtkmOut, vtkStructuredGrid* output, vtkDataSet* input);
60 
61 VTK_ABI_NAMESPACE_END
62 }
63 
64 #endif // vtkmlib_DataSetConverters_h
represent and manipulate attribute data in a dataset
abstract class to specify dataset behavior
Definition: vtkDataSet.h:165
topologically and geometrically regular array of data
Definition: vtkImageData.h:155
represent and manipulate 3D points
Definition: vtkPoints.h:138
a dataset that is topologically regular with variable spacing in the three coordinate directions
topologically regular array of data
VTKACCELERATORSVTKMDATAMODEL_EXPORT void PassAttributesInformation(vtkDataSetAttributes *input, vtkDataSetAttributes *output)
VTKACCELERATORSVTKMCORE_EXPORT vtkDataArray * Convert(const vtkm::cont::Field &input)
VTKACCELERATORSVTKMDATAMODEL_EXPORT vtkm::cont::Field Convert(vtkDataArray *input, int association)
@ points
Definition: vtkX3D.h:446
std::map< std::string, DataArray > DataSet
key: variable name, value: DataArray
Definition: VTXTypes.h:28