Main Page | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Class Members | File Members | Related Pages

vtkPixel.h

Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Visualization Toolkit
00004   Module:    $RCSfile: vtkPixel.h,v $
00005 
00006   Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
00007   All rights reserved.
00008   See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
00009 
00010      This software is distributed WITHOUT ANY WARRANTY; without even
00011      the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
00012      PURPOSE.  See the above copyright notice for more information.
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   static void InterpolationDerivs(double pcoords[3], double derivs[8]);
00085 
00086   
00087 protected:
00088   vtkPixel();
00089   ~vtkPixel();
00090 
00091   vtkLine *Line;
00092 
00093 private:
00094   vtkPixel(const vtkPixel&);  // Not implemented.
00095   void operator=(const vtkPixel&);  // Not implemented.
00096 };
00097 
00098 //----------------------------------------------------------------------------
00099 inline int vtkPixel::GetParametricCenter(double pcoords[3])
00100 {
00101   pcoords[0] = pcoords[1] = 0.5;
00102   pcoords[2] = 0.0;
00103   return 0;
00104 }
00105 
00106 #endif
00107 
00108 

Generated on Mon Jan 21 23:07:20 2008 for VTK by  doxygen 1.4.3-20050530