VTK: Accelerators/Vtkm/DataModel/vtkmlib/DataSetConverters.h Source File

| VTK 9.3.1

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;
19 class vtkDataSetAttributes;
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
36 vtkm::cont::DataSet Convert(vtkStructuredGrid* input, FieldsFlag fields = FieldsFlag::None);
37
38 // convert a rectilinear grid type
39 VTKACCELERATORSVTKMDATAMODEL_EXPORT
40 vtkm::cont::DataSet Convert(vtkRectilinearGrid* input, FieldsFlag fields);
41
42 // determine the type and call the proper Convert routine
43 VTKACCELERATORSVTKMDATAMODEL_EXPORT
44 vtkm::cont::DataSet Convert(vtkDataSet* input, FieldsFlag fields = FieldsFlag::None);
45 VTK_ABI_NAMESPACE_END
46 }
47
48 namespace fromvtkm
49 {
50 VTK_ABI_NAMESPACE_BEGIN
51
52 VTKACCELERATORSVTKMDATAMODEL_EXPORT
53 void PassAttributesInformation(vtkDataSetAttributes* input, vtkDataSetAttributes* output);
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
ArrayConverters.h
vtkDataSetAttributes
represent and manipulate attribute data in a dataset
Definition: vtkDataSetAttributes.h:65
vtkDataSet
abstract class to specify dataset behavior
Definition: vtkDataSet.h:62
vtkImageData
topologically and geometrically regular array of data
Definition: vtkImageData.h:52
vtkPoints
represent and manipulate 3D points
Definition: vtkPoints.h:38
vtkRectilinearGrid
a dataset that is topologically regular with variable spacing in the three coordinate directions
Definition: vtkRectilinearGrid.h:56
vtkStructuredGrid
topologically regular array of data
Definition: vtkStructuredGrid.h:63
fromvtkm
Definition: DataArrayConverters.h:113
fromvtkm::PassAttributesInformation
VTKACCELERATORSVTKMDATAMODEL_EXPORT void PassAttributesInformation(vtkDataSetAttributes *input, vtkDataSetAttributes *output)
fromvtkm::Convert
VTKACCELERATORSVTKMCORE_EXPORT vtkDataArray * Convert(const vtkm::cont::Field &input)
tovtkm
Definition: DataArrayConverters.h:35
tovtkm::FieldsFlag
FieldsFlag
Definition: DataArrayConverters.h:101
tovtkm::FieldsFlag::None
@ None
tovtkm::Convert
VTKACCELERATORSVTKMDATAMODEL_EXPORT vtkm::cont::Field Convert(vtkDataArray *input, int association)
vtkX3D::points
@ points
Definition: vtkX3D.h:446
vtx::types::DataSet
std::map< std::string, DataArray > DataSet
key: variable name, value: DataArray
Definition: VTXTypes.h:28