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>
43template<
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));
63template<
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]));
83template<
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]));
103template<
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);
object to represent cell connectivity
int GetNextCell(vtkIdType &npts, vtkIdType *&pts)
A cell traversal methods that is more efficient than vtkDataSet traversal methods.
void InitTraversal()
A cell traversal methods that is more efficient than vtkDataSet traversal methods.
topologically and geometrically regular array of data
virtual double * GetOrigin()
virtual int * GetExtent()
virtual double * GetSpacing()
virtual vtkPoints * GetPoints()
vtkIdType GetNumberOfPoints() override
See vtkDataSet for additional information.
dataset represents arbitrary combinations of all possible cell types
vtkCellArray * GetCells()
vtkIdType GetNumberOfCells() override
Determine the number of cells composing the dataset.
void convertTopology(vtkUnstructuredGrid *input, std::vector< dax::Id > &topo)
VTKDataSetType::DaxDataSetType dataSetConverter(vtkImageData *input, VTKDataSetType)