00001 # ifndef Conjecture_ImageArgs_h
00002 # define Conjecture_ImageArgs_h Conjecture_ImageArgs_h
00003
00004
00005
00006
00007 # include "Root.h"
00008 # include "Coord.h"
00009
00010 namespace Conjecture {
00011 class Image;
00027
00028
00029
00030
00031
00032
00033
00034
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;
00132 };
00133 };
00134
00135 # endif // Conjecture_ImageArgs_h
00136