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 00030 #ifndef __WATERSHED_H__ 00031 #define __WATERSHED_H__ 00032 00033 #include <ip_function.h> 00034 #include <regionMap.h> 00035 #include <tlist.h> 00036 00037 namespace iptk 00038 { // Start of namespace brace. 00039 00046 class Watershed : public iptk::IP_Function 00047 { 00048 public: 00052 Watershed(void); 00053 00056 Watershed(const iptk::Image &im); 00057 00062 Watershed(const Watershed &w); 00063 00066 virtual ~Watershed(); 00067 00072 virtual void setParams(double params[]); 00073 00077 virtual void process(void); 00078 00082 virtual iptk::Image getResult(void); 00083 00087 iptk::RegionMap getRegionMap(void); 00088 00092 tutk::List< gutk::Region > getRegionList(void); 00093 00094 private: 00095 iptk::Image result; 00096 tutk::List< gutk::Region > regionList, boundaryList; 00097 iptk::RegionMap regionMap, boundaryMap; 00098 int sparseness; 00099 }; 00100 00101 } // End of namespace. 00102 00103 #endif // __WATERSHED_H__ 00104