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

ltiHomographyEstimatorFactory.h

00001 /*
00002  * Copyright (C) 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 .......: ltiHomographyEstimatorFactory.h
00027  * authors ....: Claudia Goenner
00028  * organization: LTI, RWTH Aachen
00029  * creation ...: 18.4.2004
00030  * revisions ..: $Id: ltiHomographyEstimatorFactory.h,v 1.3 2006/02/08 11:18:08 ltilib Exp $
00031  */
00032 
00033 #ifndef _LTI_HOMOGRAPHY_ESTIMATOR__FACTORY
00034 #define _LTI_HOMOGRAPHY_ESTIMATOR__FACTORY
00035 
00036 #include "ltiTransformEstimatorType.h"
00037 #include "ltiHomographyEstimatorBase.h"
00038 #include "ltiObjectFactory.h"
00039 
00040 namespace lti {
00041 
00042   /**
00043    * This class defines a factory for homography estimator functors.
00044    *
00045    * The applications should check if this functor
00046    * returns a valid instance (not null pointer).
00047    */
00048   class homographyEstimatorFactory: public object {
00049 
00050   public:
00051     /**
00052      * Constructor.
00053      */
00054     homographyEstimatorFactory();
00055 
00056     /**
00057      * Destructor.
00058      */
00059     virtual ~homographyEstimatorFactory();
00060 
00061     /**
00062      * returns the name of this type ("homographyEstimatorFactory")
00063      */
00064     virtual const char* getTypeName() const;
00065 
00066     /**
00067      * Creates a new instance of the class whose name is given
00068      * as parameter, if this class is known to the factory.
00069      * Otherwise, it returns null.
00070      * @param name name of the to-be instantiated class.
00071      * @return a new instance.
00072      */
00073     virtual homographyEstimatorBase* newInstance(const char *name) const;
00074 
00075     /**
00076      * Creates a new instance of the class whose name is given
00077      * as parameter, if this class is known to the factory.
00078      * Otherwise, it returns null.
00079      * @param name name of the to-be instantiated class.
00080      * @return a new instance.
00081      */
00082     virtual homographyEstimatorBase* 
00083       newInstance(const std::string& name) const {
00084       return newInstance(name.c_str());
00085     }
00086 
00087     /**
00088      * Creates a new instance of the class whose name is given
00089      * as parameter, if this class is known to the factory.
00090      * Otherwise, it returns null.
00091      * @param name type of the to-be instantiated class.
00092      * @return a new instance.
00093      */
00094     virtual homographyEstimatorBase* 
00095       newInstance(eTransformEstimatorType& name) const;
00096 
00097   private:
00098 
00099     /**
00100      * homography estimators used in the factory
00101      */
00102     static const homographyEstimatorBase *const  homographyEstimators[];
00103 
00104     /**
00105      * the real object factory
00106      */
00107     static objectFactory<homographyEstimatorBase> factory;
00108 
00109   };
00110 
00111 
00112 }
00113 
00114 #endif

Generated on Sat Apr 10 15:25:39 2010 for LTI-Lib by Doxygen 1.6.1