VTK  9.7.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 viskores setup
14 
15 #include <viskores/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 viskores::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  vtkDataSet* input, FieldsFlag fields = FieldsFlag::None, bool forceViskores = false);
46 VTK_ABI_NAMESPACE_END
47 }
48 
49 namespace fromvtkm
50 {
51 VTK_ABI_NAMESPACE_BEGIN
52 
53 VTKACCELERATORSVTKMDATAMODEL_EXPORT
55 
56 VTKACCELERATORSVTKMDATAMODEL_EXPORT
57 bool Convert(const viskores::cont::DataSet& vtkmOut, vtkRectilinearGrid* output, vtkDataSet* input);
58 
59 VTKACCELERATORSVTKMDATAMODEL_EXPORT
60 bool Convert(const viskores::cont::DataSet& vtkmOut, vtkStructuredGrid* output, vtkDataSet* input);
61 
62 VTK_ABI_NAMESPACE_END
63 }
64 
65 #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:56
VTKACCELERATORSVTKMDATAMODEL_EXPORT viskores::cont::Field Convert(vtkDataArray *input, int association)
topologically and geometrically regular array of data
Definition: vtkImageData.h:45
VTKACCELERATORSVTKMDATAMODEL_EXPORT void PassAttributesInformation(vtkDataSetAttributes *input, vtkDataSetAttributes *output)
std::map< std::string, DataArray > DataSet
key: variable name, value: DataArray
Definition: VTXTypes.h:28
represent and manipulate attribute data in a dataset
topologically regular array of data
VTKACCELERATORSVTKMCORE_EXPORT vtkDataArray * Convert(const viskores::cont::Field &input)
represent and manipulate 3D points
Definition: vtkPoints.h:30