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