17 #ifndef __vtkDaxMarchingCubesImpl_h
18 #define __vtkDaxMarchingCubesImpl_h
21 #include "vtkDaxConfig.h"
44 #include "vtkToDax/Portals.h"
45 #include "vtkToDax/Containers.h"
46 #include "vtkToDax/CellTypeToType.h"
47 #include "vtkToDax/DataSetTypeToType.h"
48 #include "vtkToDax/FieldTypeToType.h"
49 #include "vtkToDax/MarchingCubes.h"
63 vtkCell* cell,
double isoValue):
64 Input(in),Cell(cell),IsoValue(isoValue),Result(out){}
66 template<
typename LHS>
71 if (arrayField.GetNumberOfComponents() == 1)
75 typedef typename vtkToDax::FieldTypeToType<LHS,1>::FieldType FT1;
76 return dispatchOnFieldType<LHS,FT1>(arrayField);
81 template<
typename VTKArrayType,
typename DaxFieldType>
84 typedef DaxFieldType FieldType;
85 typedef vtkToDax::vtkArrayContainerTag<VTKArrayType> FieldTag;
86 typedef dax::cont::ArrayHandle<FieldType,FieldTag> FieldHandle;
88 typedef typename dax::cont::ArrayHandle
89 <FieldType, FieldTag>::PortalConstControl PortalType;
91 FieldHandle
field = FieldHandle( PortalType(&vtkField,
92 vtkField.GetNumberOfTuples() ) );
93 vtkToDax::MarchingCubes<FieldHandle> marching(field,
95 marching.setFieldName(vtkField.GetName());
96 marching.setOutputGrid(this->Result);
104 int validMC = dataDispatcher.
Go(this->Input,this->Cell);
131 return fieldDispatcher.
Go(field);
ReturnType Go(BaseLhs *lhs, BaseRhs *rhs)
GLenum GLenum GLenum input
abstract class to specify dataset behavior
dynamic, self-adjusting array of float
concrete dataset represents vertices, lines, polygons, and triangle strips
abstract class to specify cell behavior
Dispatch to functor based on two pointer types.
a cell that represents a 3D orthogonal parallelepiped
topologically and geometrically regular array of data
abstract superclass for arrays of numeric data
int MarchingCubes(vtkDataSet *input, vtkPolyData *output, vtkDataArray *field, float isoValue)
Dispatch to functor based on a pointer type.
CellTypeInDataSet cellType(vtkDataSet *input)
ReturnType Go(BaseLhs *lhs)