17 #ifndef __vtkDaxThresholdImpl_h
18 #define __vtkDaxThresholdImpl_h
21 #include "vtkDaxConfig.h"
53 #include "vtkToDax/CellTypeToType.h"
54 #include "vtkToDax/Containers.h"
55 #include "vtkToDax/DataSetTypeToType.h"
56 #include "vtkToDax/FieldTypeToType.h"
57 #include "vtkToDax/Portals.h"
58 #include "vtkToDax/Threshold.h"
75 vtkCell* cell,
double lower,
double upper):
78 template<
typename LHS>
83 switch(arrayField.GetNumberOfComponents())
88 typedef typename vtkToDax::FieldTypeToType<LHS,1>::FieldType FT1;
89 return dispatchOnFieldType<LHS,FT1>(arrayField);
91 typedef typename vtkToDax::FieldTypeToType<LHS,2>::FieldType FT2;
92 return dispatchOnFieldType<LHS,FT2>(arrayField);
94 typedef typename vtkToDax::FieldTypeToType<LHS,3>::FieldType FT3;
95 return dispatchOnFieldType<LHS,FT3>(arrayField);
106 template<
typename VTKArrayType,
typename DaxFieldType>
109 typedef DaxFieldType FieldType;
110 typedef vtkToDax::vtkArrayContainerTag<VTKArrayType> FieldTag;
111 typedef dax::cont::ArrayHandle<FieldType,FieldTag> FieldHandle;
112 typedef typename dax::cont::ArrayHandle<FieldType,
113 FieldTag>::PortalConstControl PortalType;
115 FieldHandle
field = FieldHandle( PortalType(&vtkField,
116 vtkField.GetNumberOfTuples() ) );
117 vtkToDax::Threshold<FieldHandle> threshold(field,
120 threshold.setFieldName(vtkField.GetName());
121 threshold.setOutputGrid(this->
Result);
137 int validThreshold = dataDispatcher.
Go(this->
Input,this->
Cell);
138 return validThreshold;
167 return fieldDispatcher.
Go(field);
ReturnType Go(BaseLhs *lhs, BaseRhs *rhs)
GLenum GLenum GLenum input
abstract class to specify dataset behavior
a cell that represents a 3D point
dynamic, self-adjusting array of float
a cell that represents a 2D quadrilateral
a 3D cell that represents a tetrahedron
cell represents a 1D line
abstract class to specify cell behavior
dynamic, self-adjusting array of int
Dispatch to functor based on two pointer types.
a cell that represents a 3D orthogonal parallelepiped
int Threshold(vtkDataSet *input, vtkUnstructuredGrid *output, vtkDataArray *field, double lower, double upper)
topologically and geometrically regular array of data
dataset represents arbitrary combinations of all possible cell types
abstract superclass for arrays of numeric data
a cell that represents a linear 3D hexahedron
Dispatch to functor based on a pointer type.
dynamic, self-adjusting array of unsigned char
CellTypeInDataSet cellType(vtkDataSet *input)
ReturnType Go(BaseLhs *lhs)
a cell that represents a triangle
a 3D cell that represents a linear wedge