- Main Page
- Classes
- Files

- File List
- File Members

# Simple.h

Go to the documentation of this file.

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