latest version v1.9 - last update 10 Apr 2010 |
00001 /* 00002 * Copyright (C) 2000, 2001, 2002, 2003, 2004, 2005, 2006 00003 * Lehrstuhl fuer Technische Informatik, RWTH-Aachen, Germany 00004 * 00005 * This file is part of the LTI-Computer Vision Library (LTI-Lib) 00006 * 00007 * The LTI-Lib is free software; you can redistribute it and/or 00008 * modify it under the terms of the GNU Lesser General Public License (LGPL) 00009 * as published by the Free Software Foundation; either version 2.1 of 00010 * the License, or (at your option) any later version. 00011 * 00012 * The LTI-Lib is distributed in the hope that it will be 00013 * useful, but WITHOUT ANY WARRANTY; without even the implied warranty 00014 * of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00015 * GNU Lesser General Public License for more details. 00016 * 00017 * You should have received a copy of the GNU Lesser General Public 00018 * License along with the LTI-Lib; see the file LICENSE. If 00019 * not, write to the Free Software Foundation, Inc., 59 Temple Place - 00020 * Suite 330, Boston, MA 02111-1307, USA. 00021 */ 00022 00023 00024 /*---------------------------------------------------------------- 00025 * project ....: LTI Digital Image/Signal Processing Library 00026 * file .......: ltiMorphology.h 00027 * authors ....: Pablo Alvarado 00028 * organization: LTI, RWTH Aachen 00029 * creation ...: 19.7.2000 00030 * revisions ..: $Id: ltiMorphology.h,v 1.5 2006/02/08 11:31:56 ltilib Exp $ 00031 */ 00032 00033 #ifndef _LTI_MORPHOLOGY_H_ 00034 #define _LTI_MORPHOLOGY_H_ 00035 00036 #include "ltiObject.h" 00037 #include "ltiModifier.h" 00038 00039 namespace lti { 00040 /** 00041 * Base class for all morphological operators 00042 */ 00043 class morphology : public modifier { 00044 public: 00045 /** 00046 * the parameters for the class morphology 00047 */ 00048 class parameters : public modifier::parameters { 00049 public: 00050 /** 00051 * default constructor 00052 */ 00053 parameters(); 00054 00055 /** 00056 * copy constructor 00057 * @param other the parameters object to be copied 00058 */ 00059 parameters(const parameters& other); 00060 00061 /** 00062 * destructor 00063 */ 00064 ~parameters(); 00065 00066 /** 00067 * returns name of this type 00068 */ 00069 const char* getTypeName() const; 00070 00071 /** 00072 * copy the contents of a parameters object 00073 * @param other the parameters object to be copied 00074 * @return a reference to this parameters object 00075 */ 00076 parameters& copy(const parameters& other); 00077 00078 /** 00079 * returns a pointer to a clone of the parameters 00080 */ 00081 virtual functor::parameters* clone() const; 00082 00083 }; 00084 00085 /** 00086 * default constructor 00087 */ 00088 morphology(); 00089 00090 /** 00091 * copy constructor 00092 * @param other the object to be copied 00093 */ 00094 morphology(const morphology& other); 00095 00096 /** 00097 * destructor 00098 */ 00099 virtual ~morphology(); 00100 00101 /** 00102 * returns the name of this type ("morphology") 00103 */ 00104 virtual const char* getTypeName() const; 00105 00106 /** 00107 * operates on the given parameter. 00108 * @param srcdest channel with the source data. The result 00109 * will be left here too. 00110 * @return true if successful, false otherwise. 00111 */ 00112 virtual bool apply(channel& srcdest) const = 0; 00113 00114 /** 00115 * operates on the given parameter. 00116 * @param srcdest channel8 with the source data. The result 00117 * will be left here too. 00118 * @return true if successful, false otherwise. 00119 */ 00120 virtual bool apply(channel8& srcdest) const = 0; 00121 00122 /** 00123 * operates on a copy of the given parameters. 00124 * @param src channel with the source data. 00125 * @param dest channel where the result will be left. 00126 * @return true if successful, false otherwise. 00127 */ 00128 virtual bool apply(const channel& src,channel& dest) const = 0; 00129 00130 /** 00131 * operates on a copy of the given parameters. 00132 * @param src channel8 with the source data. 00133 * @param dest channel8 where the result will be left. 00134 * @return true if successful, false otherwise. 00135 */ 00136 virtual bool apply(const channel8& src,channel8& dest) const = 0; 00137 00138 /** 00139 * copy data of "other" functor. 00140 * @param other the functor to be copied 00141 * @return a reference to this functor object 00142 */ 00143 morphology& copy(const morphology& other); 00144 00145 /* 00146 * returns a pointer to a clone of this functor. 00147 */ 00148 //virtual functor* clone() const; 00149 00150 /** 00151 * returns used parameters 00152 */ 00153 const parameters& getParameters() const; 00154 }; 00155 } 00156 00157 #endif