00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00033 #ifndef __vtkVoxel_h
00034 #define __vtkVoxel_h
00035
00036 #include "vtkCell3D.h"
00037
00038 class vtkLine;
00039 class vtkPixel;
00040
00041 class VTK_FILTERING_EXPORT vtkVoxel : public vtkCell3D
00042 {
00043 public:
00044 static vtkVoxel *New();
00045 vtkTypeRevisionMacro(vtkVoxel,vtkCell3D);
00046 void PrintSelf(ostream& os, vtkIndent indent);
00047
00049
00050 virtual void GetEdgePoints(int edgeId, int* &pts);
00051 virtual void GetFacePoints(int faceId, int* &pts);
00052 virtual double *GetParametricCoords();
00054
00056
00057 int GetCellType() {return VTK_VOXEL;}
00058 int GetCellDimension() {return 3;}
00059 int GetNumberOfEdges() {return 12;}
00060 int GetNumberOfFaces() {return 6;}
00061 vtkCell *GetEdge(int edgeId);
00062 vtkCell *GetFace(int faceId);
00063 int CellBoundary(int subId, double pcoords[3], vtkIdList *pts);
00064 void Contour(double value, vtkDataArray *cellScalars,
00065 vtkPointLocator *locator, vtkCellArray *verts,
00066 vtkCellArray *lines, vtkCellArray *polys,
00067 vtkPointData *inPd, vtkPointData *outPd,
00068 vtkCellData *inCd, vtkIdType cellId, vtkCellData *outCd);
00069 int EvaluatePosition(double x[3], double* closestPoint,
00070 int& subId, double pcoords[3],
00071 double& dist2, double *weights);
00072 void EvaluateLocation(int& subId, double pcoords[3], double x[3],
00073 double *weights);
00074 int IntersectWithLine(double p1[3], double p2[3], double tol, double& t,
00075 double x[3], double pcoords[3], int& subId);
00076 int Triangulate(int index, vtkIdList *ptIds, vtkPoints *pts);
00077 void Derivatives(int subId, double pcoords[3], double *values,
00078 int dim, double *derivs);
00080
00082
00083 static void InterpolationFunctions(double pcoords[3], double weights[8]);
00084 static void InterpolationDerivs(double pcoords[3], double derivs[24]);
00085 static int *GetEdgeArray(int edgeId);
00086 static int *GetFaceArray(int faceId);
00088
00089 protected:
00090 vtkVoxel();
00091 ~vtkVoxel();
00092
00093 vtkLine *Line;
00094 vtkPixel *Pixel;
00095
00096 private:
00097 vtkVoxel(const vtkVoxel&);
00098 void operator=(const vtkVoxel&);
00099 };
00100
00101 #endif
00102
00103