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