Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

RWArcVector.H

Go to the documentation of this file.
00001 /*---------------------------------------------------------------------+
00002  | Library QgarLib, graphics analysis and recognition                  |
00003  | Copyright (C) 2002  Qgar Project, LORIA                             |
00004  |                                                                     |
00005  | This library is free software; you can redistribute it and/or       |
00006  | modify it under the terms of the GNU Lesser General Public          |
00007  | License version 2.1, as published by the Free Software Foundation.  |
00008  |                                                                     |
00009  | This library is distributed in the hope that it will be useful,     |
00010  | but WITHOUT ANY WARRANTY; without even the implied warranty of      |
00011  | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.                |
00012  | See the GNU Lesser General Public License for more details.         |
00013  |                                                                     |
00014  | The GNU Lesser General Public License is included in the file       |
00015  | LICENSE.LGPL, in the root directory of the Qgar packaging. See      |
00016  | http://www.gnu.org/licenses/lgpl.html for the terms of the licence. |
00017  | To receive a paper copy, write to the Free Software Foundation,     |
00018  | Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.       |
00019  |                                                                     |
00020  | Contact Project Qgar for any information:                           |
00021  |   LORIA - équipe Qgar                                               |
00022  |   B.P. 239, 54506 Vandoeuvre-lès-Nancy Cedex, France                |
00023  |   email: qgar-contact@loria.fr                                      |
00024  |   http://www.qgar.org/                                              |
00025  *---------------------------------------------------------------------*/
00026 
00027 
00028 #ifndef __RWARCVECTOR_H_INCLUDED__
00029 #define __RWARCVECTOR_H_INCLUDED__
00030 
00031 
00032 /**
00033  * @file    RWArcVector.H
00034  * @brief   Header file of class qgar::RWArcVector.
00035  *
00036  * @author  <a href="mailto:qgar-develop@loria.fr?subject=Qgar fwd Christian Ah-Soon">Christian Ah-Soon</a>
00037  * @date    July 3, 2001  16:29
00038  * @since   Qgar 1.0
00039  */
00040 
00041 
00042 // For RCS/CVS use: Do not delete
00043 /* $Id: RWArcVector.H,v 1.3 2005/07/13 16:29:02 masini Exp $ */
00044 
00045 
00046 
00047 // STD
00048 #include <vector>
00049 // QGAR
00050 #include <qgarlib/primitives.H>
00051 namespace qgar
00052 {
00053   // Avoid #include's when not necessary
00054   class RWSegmentVector;
00055 }
00056 
00057 
00058 
00059 namespace qgar
00060 {
00061 
00062 
00063 /** 
00064  * @class RWArcVector RWArcVector.H "qgarlib/RWArcVector.H"
00065  * @ingroup GRAPHPROC_POLYAPPROX
00066  * @brief A vector containing Qgar arcs.
00067  *
00068  * @todo
00069  * - Why ''Qgar arcs'' (from class qgar::GenQgarArc), instead of
00070  *   ''arcs'' (from class qgar::GenArc)?
00071  * - Anyway, this class was designed when STL was not available.
00072  *   To be removed!
00073  *
00074  * @author  <a href="mailto:qgar-develop@loria.fr?subject=Qgar fwd Christian Ah-Soon">Christian Ah-Soon</a>
00075  * @date    July 3, 2001  16:29
00076  * @since   Qgar 1.0
00077  */
00078 class RWArcVector
00079 
00080   : public std::vector<QgarArc>
00081 
00082 {
00083 // -------------------------------------------------------------------
00084 // P U B L I C    M E M B E R S
00085 // -------------------------------------------------------------------
00086 public:
00087   
00088   /** @name Constructors */
00089   //        ============
00090   //@{
00091   /**
00092    * @brief Construct from a vector of segments provided
00093    *   by the Rosin & West's method. 
00094    * @param  aRWvector  the vector of segments
00095    * @param  thres      threshold: when high, the arc can be
00096    *                    far from the segments
00097    */
00098   RWArcVector(RWSegmentVector& aRWvector, int thres = 50);
00099 
00100   /**
00101    * @brief Construct from two vectors of segments provided
00102    *   by the Rosin & West's method.
00103    * @param  aRWvector1  first vector of segments
00104    * @param  aRWvector2  second vector of segments
00105    * @param thres        threshold: when high, the arc can be far
00106     *                    from the segments
00107    *
00108    * @warning The two vectors must have one common extremity.
00109    */
00110   RWArcVector(RWSegmentVector& aRWvector1,
00111               RWSegmentVector& aRWvector2,
00112               int thres = 50);
00113   //@}
00114 
00115 
00116   /** @name Destructor */
00117   //        ==========
00118   //@{
00119   /**
00120    * @brief Non-virtual destructor.
00121    */
00122   virtual ~RWArcVector();
00123   //@}
00124 
00125 // -------------------------------------------------------------------
00126 // P R O T E C T E D    M E M B E R S
00127 // -------------------------------------------------------------------
00128 protected:
00129 
00130 
00131   /** @name Thresholds */
00132   //        ==========
00133   //@{
00134   /**
00135    * @brief Threshold to estimate the dispersion
00136    *   of the potential centers of an arc.
00137    */
00138   int _centerDispersionThreshold;
00139   //@}
00140 
00141 // -------------------------------------------------------------------
00142 }; // Class RWArcVector
00143 
00144 } // namespace qgar
00145 
00146 #endif /* __RWARCVECTOR_H_INCLUDED__ */
00147