latest version v1.9 - last update 10 Apr 2010 |
00001 /* 00002 * Copyright (C) 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-Lib: Image Processing and Computer Vision Library 00026 * file .......: ltiEquallySpacedSamplesInterpolator.h 00027 * authors ....: Peter Doerfler, Pablo Alvarado 00028 * organization: LTI, RWTH Aachen 00029 * creation ...: 3.5.2003 00030 * revisions ..: $Id: ltiEquallySpacedSamplesInterpolator.h,v 1.11 2006/02/08 12:19:36 ltilib Exp $ 00031 */ 00032 00033 #ifndef _LTI_EQUALLY_SPACED_SAMPLES_INTERPOLATOR_H_ 00034 #define _LTI_EQUALLY_SPACED_SAMPLES_INTERPOLATOR_H_ 00035 00036 #include "ltiInterpolator.h" 00037 00038 namespace lti { 00039 /** 00040 * This abstract class parents all interpolation functors, whose 00041 * samples have equal distances to each other (per dimension). 00042 */ 00043 class equallySpacedSamplesInterpolator : public interpolator { 00044 public: 00045 /** 00046 * the parameters for the class equallySpacedSamplesInterpolator 00047 */ 00048 class parameters : public interpolator::parameters { 00049 public: 00050 /** 00051 * Default constructor 00052 */ 00053 parameters(); 00054 00055 /** 00056 * Constructor parameters with given with boundary type 00057 */ 00058 parameters(const eBoundaryType btype); 00059 00060 /** 00061 * copy constructor 00062 * @param other the parameters object to be copied 00063 */ 00064 parameters(const parameters& other); 00065 00066 /** 00067 * destructor 00068 */ 00069 ~parameters(); 00070 00071 /** 00072 * returns name of this type 00073 */ 00074 const char* getTypeName() const; 00075 00076 /** 00077 * copy the contents of a parameters object 00078 * @param other the parameters object to be copied 00079 * @return a reference to this parameters object 00080 */ 00081 parameters& copy(const parameters& other); 00082 00083 /** 00084 * copy the contents of a parameters object 00085 * @param other the parameters object to be copied 00086 * @return a reference to this parameters object 00087 */ 00088 parameters& operator=(const parameters& other); 00089 00090 00091 /** 00092 * returns a pointer to a clone of the parameters 00093 */ 00094 virtual functor::parameters* clone() const = 0; 00095 00096 /** 00097 * write the parameters in the given ioHandler 00098 * @param handler the ioHandler to be used 00099 * @param complete if true (the default) the enclosing begin/end will 00100 * be also written, otherwise only the data block will be written. 00101 * @return true if write was successful 00102 */ 00103 virtual bool write(ioHandler& handler,const bool complete=true) const; 00104 00105 /** 00106 * read the parameters from the given ioHandler 00107 * @param handler the ioHandler to be used 00108 * @param complete if true (the default) the enclosing begin/end will 00109 * be also written, otherwise only the data block will be written. 00110 * @return true if write was successful 00111 */ 00112 virtual bool read(ioHandler& handler,const bool complete=true); 00113 00114 # ifdef _LTI_MSC_6 00115 /** 00116 * this function is required by MSVC only, as a workaround for a 00117 * very awful bug, which exists since MSVC V.4.0, and still by 00118 * V.6.0 with all bugfixes (so called "service packs") remains 00119 * there... This method is also public due to another bug, so please 00120 * NEVER EVER call this method directly: use read() instead 00121 */ 00122 bool readMS(ioHandler& handler,const bool complete=true); 00123 00124 /** 00125 * this function is required by MSVC only, as a workaround for a 00126 * very awful bug, which exists since MSVC V.4.0, and still by 00127 * V.6.0 with all bugfixes (so called "service packs") remains 00128 * there... This method is also public due to another bug, so please 00129 * NEVER EVER call this method directly: use write() instead 00130 */ 00131 bool writeMS(ioHandler& handler,const bool complete=true) const; 00132 # endif 00133 00134 // ------------------------------------------------ 00135 // the parameters 00136 // ------------------------------------------------ 00137 00138 // no parameters yet 00139 00140 }; 00141 00142 /** 00143 * default constructor 00144 */ 00145 equallySpacedSamplesInterpolator(); 00146 00147 /** 00148 * copy constructor 00149 * @param other the object to be copied 00150 */ 00151 equallySpacedSamplesInterpolator(const equallySpacedSamplesInterpolator& other); 00152 00153 /** 00154 * destructor 00155 */ 00156 virtual ~equallySpacedSamplesInterpolator(); 00157 00158 /** 00159 * returns the name of this type ("equallySpacedSamplesInterpolator") 00160 */ 00161 virtual const char* getTypeName() const; 00162 00163 /** 00164 * copy data of "other" functor. 00165 * @param other the functor to be copied 00166 * @return a reference to this functor object 00167 */ 00168 equallySpacedSamplesInterpolator& 00169 copy(const equallySpacedSamplesInterpolator& other); 00170 00171 /** 00172 * alias for copy member 00173 * @param other the functor to be copied 00174 * @return a reference to this functor object 00175 */ 00176 equallySpacedSamplesInterpolator& 00177 operator=(const equallySpacedSamplesInterpolator& other); 00178 00179 /** 00180 * returns a pointer to a clone of this functor. 00181 */ 00182 virtual functor* clone() const = 0; 00183 00184 /** 00185 * returns used parameters 00186 */ 00187 const parameters& getParameters() const; 00188 00189 }; 00190 } 00191 00192 #endif