VTK
DataSetTypeToType.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 vtkToDax_DataSetTypeToType_h
18 #define vtkToDax_DataSetTypeToType_h
19 
20 #include "vtkType.h"
21 
22 #include <dax/cont/UniformGrid.h>
23 #include <dax/cont/UnstructuredGrid.h>
24 
25 class vtkImageData;
26 class vtkUniformGrid;
27 class vtkStructuredGrid;
29 
30 //header that determines the correct cell and datatypes that can be used together
31 #include "CellTypeAndDataType.h"
32 #include "Containers.h"
33 
34 namespace vtkToDax
35 {
36 
37 //empty implementation for dataset we don't support
38 template<typename CellTypeToTypeDef, typename vtkDataSetType> struct DataSetTypeToType
39 {
40  typedef CellTypeToTypeDef CellTypeToType;
41  typedef typename CellTypeToTypeDef::DaxCellType DaxCellType;
42  enum {VTKDataSetType=-1};
43  enum {Valid=false};
44  typedef bool DaxDataSetType;
45 };
46 
47 template<typename CellTypeToTypeDef> struct DataSetTypeToType<CellTypeToTypeDef,vtkImageData>
48 {
49  typedef CellTypeToTypeDef CellTypeToType;
50  typedef typename CellTypeToTypeDef::DaxCellType DaxCellType;
53  typedef dax::cont::UniformGrid<> DaxDataSetType;
54 };
55 
56 template<typename CellTypeToTypeDef> struct DataSetTypeToType<CellTypeToTypeDef,vtkUniformGrid>
57 {
58  typedef CellTypeToTypeDef CellTypeToType;
59  typedef typename CellTypeToTypeDef::DaxCellType DaxCellType;
62  typedef dax::cont::UniformGrid<> DaxDataSetType;
63 };
64 
65 template<typename CellTypeToTypeDef> struct DataSetTypeToType<CellTypeToTypeDef,vtkUnstructuredGrid>
66 {
67  typedef CellTypeToTypeDef CellTypeToType;
68  typedef typename CellTypeToTypeDef::DaxCellType DaxCellType;
71  typedef dax::cont::UnstructuredGrid<DaxCellType,
75 };
76 }
77 
78 #endif // vtkToDax_DataSetTypeToType_h
#define VTK_IMAGE_DATA
Definition: vtkType.h:93
CellTypeToTypeDef::DaxCellType DaxCellType
#define VTK_UNIFORM_GRID
Definition: vtkType.h:97
topologically and geometrically regular array of data
Definition: vtkImageData.h:45
dataset represents arbitrary combinations of all possible cell types
image data with blanking
topologically regular array of data
CellTypeToTypeDef CellTypeToType
dax::cont::UnstructuredGrid< DaxCellType, vtkToDax::vtkTopologyContainerTag< CellTypeToType >, vtkToDax::vtkPointsContainerTag > DaxDataSetType
#define VTK_UNSTRUCTURED_GRID
Definition: vtkType.h:91