//************************************************************************** #ifndef PIXEL_H #define PIXEL_H //************************************************************************** class Pixel { private: public: int x; int y; double strength; Pixel(int xp = 0, int yp = 0, double strengthp = 0.0) // Constructor {x = xp; y = yp; strength = strengthp;} ~Pixel() {} // Destructor inline void set(int xp, int yp, double strengthp) {x = xp; y = yp; strength = strengthp;} inline void get(int *xp, int *yp, double *strengthp) { *xp = x; *yp = y; *strengthp = strength; } inline Pixel &operator= (const Pixel &P) { x = P.x; y = P.y; strength = P.strength; return *this; } inline int operator> (Pixel &right) { return (x > right.x || (x == right.x && y > right.y)); } inline int operator< (Pixel &right) { return (x < right.x || (x == right.x && y < right.y)); } inline int operator== (Pixel &right) { return (x == right.x && y == right.y); } }; //************************************************************************** int dist(Pixel P1, Pixel P2); //************************************************************************** #endif // PIXEL_H //**************************************************************************