Canola
0.8.D001
|
00001 // 00002 // canola - canon canola 1614p emulator 00003 // Copyright (C) 2011 Peter Miller 00004 // 00005 // This program is free software; you can redistribute it and/or modify 00006 // it under the terms of the GNU General Public License, version 3, as 00007 // published by the Free Software Foundation. 00008 // 00009 // This program is distributed in the hope that it will be useful, 00010 // but WITHOUT ANY WARRANTY; without even the implied warranty of 00011 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00012 // General Public License for more details. 00013 // 00014 // You should have received a copy of the GNU General Public License along 00015 // with this program. If not, see <http://www.gnu.org/licenses/>. 00016 // 00017 00018 #ifndef LIB_IMAGE_THRESHOLD_H 00019 #define LIB_IMAGE_THRESHOLD_H 00020 00021 #include <lib/image.h> 00022 00027 class image_threshold: 00028 public image 00029 { 00030 public: 00031 typedef boost::shared_ptr<image_threshold> pointer; 00032 00036 virtual ~image_threshold(); 00037 00047 static pointer create(const image::pointer &deeper, double level); 00048 00049 protected: 00050 // See base class for documentation. 00051 const char *type_name(void) const; 00052 00053 // See base class for documentation. 00054 void get_pixel(int, int, icon_pixel&) const; 00055 00056 // See base class for documentation. 00057 void set_pixel(int, int, const icon_pixel &); 00058 00059 // See base class for documentation. 00060 unsigned int get_width(void) const; 00061 00062 // See base class for documentation. 00063 unsigned int get_height(void) const; 00064 00065 // See base class for documentation. 00066 void save_to_file(const std::string &) const; 00067 00068 private: 00078 image_threshold(const image::pointer &deeper, double level); 00079 00084 image::pointer deeper; 00085 00090 double level; 00091 00095 image_threshold(); 00096 00103 image_threshold(const image_threshold &rhs); 00104 00111 image_threshold &operator=(const image_threshold &rhs); 00112 }; 00113 00114 #endif // LIB_IMAGE_THRESHOLD_H