00001 00006 00007 // This software is distributed as part of the Improla library. 00008 // Improla is a library of classes for image processing. 00009 // 00010 // Copyright (c) 2004, B. R. Siva Chandra, India 00011 // 00012 // This program is free software; you can redistribute it and/or 00013 // modify it under the terms of the GNU General Public License 00014 // as published by the Free Software Foundation; either version 2 00015 // of the License, or (at your option) any later version. 00016 // 00017 // This program is distributed in the hope that it will be useful, 00018 // but WITHOUT ANY WARRANTY; without even the implied warranty of 00019 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00020 // GNU General Public License for more details. 00021 // 00022 // You should have received a copy of the GNU General Public License 00023 // along with this program; if not, write to the Free Software 00024 // Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 00025 // 00026 // In case you would like to contact the author, use the following e-mail 00027 // address: sivachandra_br@yahoo.com 00029 00031 // First Created : 3rd October 2004 00032 // Author : Siva Chandra 00033 // Purpose : Declares a base class used to perform image arithmetic. 00035 00036 #ifndef __ARITHMETIC_IMAGE_H__ 00037 #define __ARITHMETIC_IMAGE_H__ 00038 00039 #include <image.h> 00040 00041 namespace iptk 00042 { // Start of iptk namespace. 00043 00051 class ArithmeticImage 00052 { 00053 public: 00056 ArithmeticImage(void); 00057 00060 ArithmeticImage(const ArithmeticImage &ai); 00061 00064 ~ArithmeticImage(); 00065 00068 void setLeftImage(const iptk::Image &im); 00069 00072 void setRightImage(const iptk::Image &im); 00073 00076 iptk::Image getResult(void); 00077 00088 virtual void evaluate(void) = 0; 00089 00096 void rescale(void); 00097 00098 protected: 00101 iptk::Image LEFT_IMAGE; 00102 00105 iptk::Image RIGHT_IMAGE; 00106 00109 iptk::Image RESULT; 00110 }; 00111 00112 } // End of iptk namespace. 00113 00114 #endif // __ARITHMETIC_IMAGE_H__ 00115