EightSED.h

Go to the documentation of this file.
00001 
00029 #ifndef EightSED_h
00030 #define EightSED_h
00031 
00032 #include "DistanceTransform.h"
00033 //----------------------------------------------------------------------
00039 class EightSED : public DistanceTransform {
00040 
00041 public:
00042     EightSED ( const int xSize, const int ySize, const bool unload=true )
00043         : DistanceTransform(xSize, ySize, unload)
00044     {
00045     }
00046 
00047     ~EightSED ( ) {
00048         if (this->p!=NULL) {
00049             free( this->p );
00050             this->p = NULL;
00051         }
00052     }
00053 
00054     virtual void doTransform ( const unsigned char* const I );
00055 
00056     virtual inline bool getP ( const int x, const int y, int& px, int& py ) const {
00057         if (p==NULL)    return false;
00058         const int s = sub(x,y);
00059         px = p[s].x;
00060         py = p[s].y;
00061         return true;
00062     };
00063 
00064 protected:
00065     P  *p;
00066     void init ( double* d );
00067     void initImmediate ( const unsigned char* const I, double* d );
00068 
00069 };
00070 
00071 #endif
00072 //----------------------------------------------------------------------
00073 

Generated on Thu Jan 12 10:28:42 2006 by  doxygen 1.4.5