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