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
00037 class VTK_FILTERING_EXPORT vtkPixel : public vtkCell
00038 {
00039 public:
00040 static vtkPixel *New();
00041 vtkTypeRevisionMacro(vtkPixel,vtkCell);
00042 void PrintSelf(ostream& os, vtkIndent indent);
00043
00045
00046 int GetCellType() {return VTK_PIXEL;};
00047 int GetCellDimension() {return 2;};
00048 int GetNumberOfEdges() {return 4;};
00049 int GetNumberOfFaces() {return 0;};
00050 vtkCell *GetEdge(int edgeId);
00051 vtkCell *GetFace(int) {return 0;};
00052 int CellBoundary(int subId, double pcoords[3], vtkIdList *pts);
00053 void Contour(double value, vtkDataArray *cellScalars,
00054 vtkPointLocator *locator, vtkCellArray *verts,
00055 vtkCellArray *lines, vtkCellArray *polys,
00056 vtkPointData *inPd, vtkPointData *outPd,
00057 vtkCellData *inCd, vtkIdType cellId, vtkCellData *outCd);
00058 void Clip(double value, vtkDataArray *cellScalars,
00059 vtkPointLocator *locator, vtkCellArray *polys,
00060 vtkPointData *inPd, vtkPointData *outPd,
00061 vtkCellData *inCd, vtkIdType cellId, vtkCellData *outCd,
00062 int insideOut);
00063 int EvaluatePosition(double x[3], double* closestPoint,
00064 int& subId, double pcoords[3],
00065 double& dist2, double *weights);
00066 void EvaluateLocation(int& subId, double pcoords[3], double x[3],
00067 double *weights);
00069
00071 int GetParametricCenter(double pcoords[3]);
00072
00073 int IntersectWithLine(double p1[3], double p2[3], double tol, double& t,
00074 double x[3], double pcoords[3], int& subId);
00075 int Triangulate(int index, vtkIdList *ptIds, vtkPoints *pts);
00076 void Derivatives(int subId, double pcoords[3], double *values,
00077 int dim, double *derivs);
00078 virtual double *GetParametricCoords();
00079
00081
00082 static void InterpolationFunctions(double pcoords[3], double weights[4]);
00083
00084
00085 static void InterpolationDerivs(double pcoords[3], double derivs[8]);
00086
00087
00088
00089 virtual void InterpolateFunctions(double pcoords[3], double weights[4])
00090 {
00091 vtkPixel::InterpolationFunctions(pcoords,weights);
00092 }
00093 virtual void InterpolateDerivs(double pcoords[3], double derivs[8])
00094 {
00095 vtkPixel::InterpolationDerivs(pcoords,derivs);
00096 }
00098
00099 protected:
00100 vtkPixel();
00101 ~vtkPixel();
00102
00103 vtkLine *Line;
00104
00105 private:
00106 vtkPixel(const vtkPixel&);
00107 void operator=(const vtkPixel&);
00108 };
00109
00110
00111 inline int vtkPixel::GetParametricCenter(double pcoords[3])
00112 {
00113 pcoords[0] = pcoords[1] = 0.5;
00114 pcoords[2] = 0.0;
00115 return 0;
00116 }
00117
00118 #endif
00119
00120