ImageArgs.h

00001 # ifndef Conjecture_ImageArgs_h
00002 # define Conjecture_ImageArgs_h Conjecture_ImageArgs_h
00003 
00004 // Insert SVN header substitution variable here
00005 // Class Champion: Wade
00006 
00007 # include "Root.h"
00008 # include "Coord.h"  // uint8_t, uint16_t
00009 
00010 namespace Conjecture {
00011     class Image;
00027     // FUTURE FIX: Should the max values of 'threshold' and 'quantize'
00028     // be downgraded to 255? Currently uint16_t values to support max
00029     // intensities up to 65535, but this is probably entirely
00030     // unnecessary. If we put them down to uint8_t's, the structure as-is
00031     // would fit in a word.  But more fields are likely to be added.
00032     
00033     // FUTURE FIX: Should we add a 'verbose' field to this class?
00034     // Would help in Image::Image.
00035 
00036     class ImageArgs : public Root {
00037         
00038       public:
00044         ImageArgs(uint8_t magnification = 1, uint16_t threshold = 0, uint16_t quantize = 0, uint8_t filter = 0, uint8_t dustsize = 0);
00045         
00046         uint8_t  magnification() const   { return this->_magnification; }
00047         uint16_t threshold()     const   { return this->_threshold;     }
00048         uint16_t quantize()      const   { return this->_quantize;      }
00049         uint8_t  filter()        const   { return this->_filter;        }
00050         uint8_t  dustsize()      const   { return this->_dustsize;      }
00051         
00052         uint8_t&  magnification()        { return this->_magnification; }
00053         uint16_t& threshold()            { return this->_threshold;     }
00054         uint16_t& quantize()             { return this->_quantize;      }
00055         uint8_t&  filter()               { return this->_filter;        }
00056         uint8_t&  dustsize()             { return this->_dustsize;      }
00057         
00067         uint16_t apply(const Image* image, const Coord& pos) const;
00068 
00077         static const uint16_t MaxVal;
00078         static const uint16_t MinVal;
00079 
00080       private:
00090         uint8_t _magnification;
00091 
00098         uint16_t _threshold;
00099 
00108         uint16_t _quantize;
00109 
00118         uint8_t _filter;
00119         
00125         uint8_t _dustsize;
00126 
00131         std::string str() const; // printable representation
00132     };
00133 };
00134 
00135 # endif // Conjecture_ImageArgs_h
00136 

Generated on Thu Jun 15 19:56:10 2006 for Conjecture by  doxygen 1.4.6