00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00030 #ifndef __vtkPixel_h
00031 #define __vtkPixel_h
00032
00033 #include "vtkCell.h"
00034
00035 class vtkLine;
00036 class vtkIncrementalPointLocator;
00037
00038 class VTK_FILTERING_EXPORT vtkPixel : public vtkCell
00039 {
00040 public:
00041 static vtkPixel *New();
00042 vtkTypeMacro(vtkPixel,vtkCell);
00043 void PrintSelf(ostream& os, vtkIndent indent);
00044
00046
00047 int GetCellType() {return VTK_PIXEL;};
00048 int GetCellDimension() {return 2;};
00049 int GetNumberOfEdges() {return 4;};
00050 int GetNumberOfFaces() {return 0;};
00051 vtkCell *GetEdge(int edgeId);
00052 vtkCell *GetFace(int) {return 0;};
00053 int CellBoundary(int subId, double pcoords[3], vtkIdList *pts);
00054 void Contour(double value, vtkDataArray *cellScalars,
00055 vtkIncrementalPointLocator *locator, vtkCellArray *verts,
00056 vtkCellArray *lines, vtkCellArray *polys,
00057 vtkPointData *inPd, vtkPointData *outPd,
00058 vtkCellData *inCd, vtkIdType cellId, vtkCellData *outCd);
00059 void Clip(double value, vtkDataArray *cellScalars,
00060 vtkIncrementalPointLocator *locator, vtkCellArray *polys,
00061 vtkPointData *inPd, vtkPointData *outPd,
00062 vtkCellData *inCd, vtkIdType cellId, vtkCellData *outCd,
00063 int insideOut);
00064 int EvaluatePosition(double x[3], double* closestPoint,
00065 int& subId, double pcoords[3],
00066 double& dist2, double *weights);
00067 void EvaluateLocation(int& subId, double pcoords[3], double x[3],
00068 double *weights);
00070
00072 int GetParametricCenter(double pcoords[3]);
00073
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);
00079 virtual double *GetParametricCoords();
00080
00082
00083 static void InterpolationFunctions(double pcoords[3], double weights[4]);
00084
00085
00086 static void InterpolationDerivs(double pcoords[3], double derivs[8]);
00087
00088
00089
00090 virtual void InterpolateFunctions(double pcoords[3], double weights[4])
00091 {
00092 vtkPixel::InterpolationFunctions(pcoords,weights);
00093 }
00094 virtual void InterpolateDerivs(double pcoords[3], double derivs[8])
00095 {
00096 vtkPixel::InterpolationDerivs(pcoords,derivs);
00097 }
00099
00100 protected:
00101 vtkPixel();
00102 ~vtkPixel();
00103
00104 vtkLine *Line;
00105
00106 private:
00107 vtkPixel(const vtkPixel&);
00108 void operator=(const vtkPixel&);
00109 };
00110
00111
00112 inline int vtkPixel::GetParametricCenter(double pcoords[3])
00113 {
00114 pcoords[0] = pcoords[1] = 0.5;
00115 pcoords[2] = 0.0;
00116 return 0;
00117 }
00118
00119 #endif
00120
00121