00001 /* 00002 * pix.H 00003 * 00004 * 00005 * Created by Randolph Voorhies on 11/13/07. 00006 * Copyright 2007 __MyCompanyName__. All rights reserved. 00007 * 00008 */ 00009 00010 #ifndef PIX_H 00011 #define PIX_H 00012 00013 //A simple pixel class that holds a pixel's coordinates and value 00014 template <class T> class pix { 00015 public: 00016 int x,y; 00017 T val; 00018 00019 pix() {} 00020 00021 pix(int _x, int _y, T _val) { 00022 x = _x; 00023 y = _y; 00024 val = _val; 00025 } 00026 00027 bool operator < (const pix<T> &y) const { 00028 return y.val > val; 00029 } 00030 00031 bool operator > (const pix<T> &y) const { 00032 return y.val < val; 00033 } 00034 00035 }; 00036 00037 #endif