00001
00029 #ifndef SimpleList_h
00030 #define SimpleList_h
00031
00032 #include "DistanceTransform.h"
00033 #include <iostream>
00034 using namespace std;
00035
00043 class SimpleList : public DistanceTransform {
00044
00045 public:
00046 SimpleList ( const int xSize, const int ySize, const bool unload=true )
00047 : DistanceTransform(xSize, ySize, unload)
00048 {
00049 }
00050
00051 void doTransform ( const unsigned char* const I );
00052
00060 virtual inline bool getP ( const int x, const int y, int& px, int& py ) const {
00061 if (p==NULL) return false;
00062 const int s = sub(x,y);
00063 px = p[s].x;
00064 py = p[s].y;
00065 return true;
00066 }
00067
00068 protected:
00069 P *p;
00070 };
00071
00072 #endif
00073