00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037
00038
00039
00055 #ifndef __vtkVoxel_h
00056 #define __vtkVoxel_h
00057
00058 #include "vtkLine.h"
00059 #include "vtkPixel.h"
00060
00061 class VTK_EXPORT vtkVoxel : public vtkCell
00062 {
00063 public:
00064 static vtkVoxel *New();
00065 vtkTypeMacro(vtkVoxel,vtkCell);
00066
00068 vtkCell *MakeObject();
00069 int GetCellType() {return VTK_VOXEL;};
00070 int GetCellDimension() {return 3;};
00071 int GetNumberOfEdges() {return 12;};
00072 int GetNumberOfFaces() {return 6;};
00073 vtkCell *GetEdge(int edgeId);
00074 vtkCell *GetFace(int faceId);
00075 static int *GetFaceArray(int faceId);
00076 int CellBoundary(int subId, float pcoords[3], vtkIdList *pts);
00077 void Contour(float value, vtkScalars *cellScalars,
00078 vtkPointLocator *locator, vtkCellArray *verts,
00079 vtkCellArray *lines, vtkCellArray *polys,
00080 vtkPointData *inPd, vtkPointData *outPd,
00081 vtkCellData *inCd, int cellId, vtkCellData *outCd);
00082 void Clip(float value, vtkScalars *cellScalars,
00083 vtkPointLocator *locator, vtkCellArray *tetras,
00084 vtkPointData *inPd, vtkPointData *outPd,
00085 vtkCellData *inCd, int cellId, vtkCellData *outCd, int insideOut);
00086 int EvaluatePosition(float x[3], float* closestPoint,
00087 int& subId, float pcoords[3],
00088 float& dist2, float *weights);
00089 void EvaluateLocation(int& subId, float pcoords[3], float x[3],
00090 float *weights);
00091 int IntersectWithLine(float p1[3], float p2[3], float tol, float& t,
00092 float x[3], float pcoords[3], int& subId);
00093 int Triangulate(int index, vtkIdList *ptIds, vtkPoints *pts);
00094 void Derivatives(int subId, float pcoords[3], float *values,
00095 int dim, float *derivs);
00096
00098 static void InterpolationFunctions(float pcoords[3], float weights[8]);
00099 static void InterpolationDerivs(float pcoords[3], float derivs[24]);
00100
00101 #ifndef VTK_REMOVE_LEGACY_CODE
00102
00103 int CellBoundary(int subId, float pcoords[3], vtkIdList &pts)
00104 {VTK_LEGACY_METHOD(CellBoundary,"3.2"); return this->CellBoundary(subId, pcoords, &pts);}
00105 int Triangulate(int index, vtkIdList &ptIds, vtkPoints &pts)
00106 {VTK_LEGACY_METHOD(Triangulate,"3.2"); return this->Triangulate(index, &ptIds, &pts);}
00107 #endif
00108
00109
00110 protected:
00111 vtkVoxel();
00112 ~vtkVoxel();
00113 vtkVoxel(const vtkVoxel&) {};
00114 void operator=(const vtkVoxel&) {};
00115
00116 vtkLine *Line;
00117 vtkPixel *Pixel;
00118
00119 };
00120
00121 #endif
00122
00123