17 #ifndef vtkToDax_DataSetConverter_h
18 #define vtkToDax_DataSetConverter_h
29 #include <dax/cont/ArrayHandle.h>
30 #include <dax/cont/UniformGrid.h>
31 #include <dax/cont/UnstructuredGrid.h>
43 template<
typename CellType>
45 std::vector<dax::Id>& topo)
47 enum{NUM_POINTS_IN_CELL=CellType::NUM_POINTS};
49 topo.reserve(
size*NUM_POINTS_IN_CELL);
56 std::copy(pts,pts+npts,std::back_inserter(topo));
63 template<
typename VTKDataSetType>
68 typedef typename VTKDataSetType::DaxDataSetType DataSet;
69 double origin[3];input->
GetOrigin(origin);
75 output.SetOrigin(dax::make_Vector3(origin[0],origin[1],origin[2]));
83 template<
typename VTKDataSetType>
88 typedef typename VTKDataSetType::DaxDataSetType DataSet;
89 double origin[3];input->
GetOrigin(origin);
95 output.SetOrigin(dax::make_Vector3(origin[0],origin[1],origin[2]));
103 template<
typename VTKDataSetType>
110 typedef typename VTKDataSetType::DaxDataSetType DataSet;
113 static const int NUM_POINTS = VTKDataSetType::CellTypeToType::NUM_POINTS;
116 dax::cont::ArrayHandle<dax::Vector3,vtkToDax::vtkPointsContainerTag>
121 dax::cont::ArrayHandle<dax::Id,vtkToDax::vtkTopologyContainerTag<CellTypeToType> >
125 return DataSet(topoHandle,pointsHandle);
130 #endif // vtkToDax_DataSetConverter_h