LTI-Lib latest version v1.9 - last update 10 Apr 2010

ltiVariablySpacedSamplesInterpolator.h

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 .......: ltiVariablySpacedSamplesInterpolator.h
00027  * authors ....: Peter Doerfler, Pablo Alvarado
00028  * organization: LTI, RWTH Aachen
00029  * creation ...: 3.5.2003
00030  * revisions ..: $Id: ltiVariablySpacedSamplesInterpolator.h,v 1.9 2006/02/08 12:52:11 ltilib Exp $
00031  */
00032 
00033 #ifndef _LTI_VARIABLY_SPACED_SAMPLES_INTERPOLATOR_H_
00034 #define _LTI_VARIABLY_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 varying distances.
00042    */
00043   class variablySpacedSamplesInterpolator : public interpolator {
00044   public:
00045     /**
00046      * the parameters for the class variablySpacedSamplesInterpolator
00047      */
00048     class parameters : public interpolator::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        * copy the contents of a parameters object
00080        * @param other the parameters object to be copied
00081        * @return a reference to this parameters object
00082        */
00083       parameters& operator=(const parameters& other);
00084 
00085 
00086       /**
00087        * returns a pointer to a clone of the parameters
00088        */
00089       virtual functor::parameters* clone() const = 0;
00090 
00091       /**
00092        * write the parameters in the given ioHandler
00093        * @param handler the ioHandler to be used
00094        * @param complete if true (the default) the enclosing begin/end will
00095        *        be also written, otherwise only the data block will be written.
00096        * @return true if write was successful
00097        */
00098       virtual bool write(ioHandler& handler,const bool complete=true) const;
00099 
00100       /**
00101        * read the parameters from the given ioHandler
00102        * @param handler the ioHandler to be used
00103        * @param complete if true (the default) the enclosing begin/end will
00104        *        be also written, otherwise only the data block will be written.
00105        * @return true if write was successful
00106        */
00107       virtual bool read(ioHandler& handler,const bool complete=true);
00108 
00109 #     ifdef _LTI_MSC_6
00110       /**
00111        * this function is required by MSVC only, as a workaround for a
00112        * very awful bug, which exists since MSVC V.4.0, and still by
00113        * V.6.0 with all bugfixes (so called "service packs") remains
00114        * there...  This method is also public due to another bug, so please
00115        * NEVER EVER call this method directly: use read() instead
00116        */
00117       bool readMS(ioHandler& handler,const bool complete=true);
00118 
00119       /**
00120        * this function is required by MSVC only, as a workaround for a
00121        * very awful bug, which exists since MSVC V.4.0, and still by
00122        * V.6.0 with all bugfixes (so called "service packs") remains
00123        * there...  This method is also public due to another bug, so please
00124        * NEVER EVER call this method directly: use write() instead
00125        */
00126       bool writeMS(ioHandler& handler,const bool complete=true) const;
00127 #     endif
00128 
00129       // ------------------------------------------------
00130       // the parameters
00131       // ------------------------------------------------
00132     };
00133 
00134     /**
00135      * default constructor
00136      */
00137     variablySpacedSamplesInterpolator();
00138 
00139     /**
00140      * Construct a functor using the given parameters
00141      */
00142     variablySpacedSamplesInterpolator(const parameters& par);
00143 
00144     /**
00145      * copy constructor
00146      * @param other the object to be copied
00147      */
00148     variablySpacedSamplesInterpolator(const variablySpacedSamplesInterpolator& other);
00149 
00150     /**
00151      * destructor
00152      */
00153     virtual ~variablySpacedSamplesInterpolator();
00154 
00155     /**
00156      * returns the name of this type ("variablySpacedSamplesInterpolator")
00157      */
00158     virtual const char* getTypeName() const;
00159 
00160     /**
00161      * copy data of "other" functor.
00162      * @param other the functor to be copied
00163      * @return a reference to this functor object
00164      */
00165     variablySpacedSamplesInterpolator&
00166     copy(const variablySpacedSamplesInterpolator& other);
00167 
00168     /**
00169      * alias for copy member
00170      * @param other the functor to be copied
00171      * @return a reference to this functor object
00172      */
00173     variablySpacedSamplesInterpolator&
00174     operator=(const variablySpacedSamplesInterpolator& other);
00175 
00176     /**
00177      * returns a pointer to a clone of this functor.
00178      */
00179     virtual functor* clone() const = 0;
00180 
00181     /**
00182      * returns used parameters
00183      */
00184     const parameters& getParameters() const;
00185 
00186   };
00187 }
00188 
00189 #endif

Generated on Sat Apr 10 15:26:21 2010 for LTI-Lib by Doxygen 1.6.1