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

CloseBinaryImage.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 __CLOSEBINARYIMAGE_H_INCLUDED__
00029 #define __CLOSEBINARYIMAGE_H_INCLUDED__
00030 
00031 
00032 /**
00033  * @file     CloseBinaryImage.H
00034  * @brief    Header file of class qgar::CloseBinaryImage.
00035  *
00036  * @author   <a href="mailto:qgar-develop@loria.fr?subject=Qgar fwd Mathieu Baeumler">Mathieu Baeumler</a>
00037  * @date     July 18, 2002  15:48
00038  * @since    Qgar 2.0
00039  */
00040 
00041 
00042 // For RCS/CVS use: Do not delete
00043 /* $Id: CloseBinaryImage.H,v 1.13 2005/01/11 13:14:08 masini Exp $ */
00044 
00045 
00046 // QGAR
00047 #include <qgarlib/GenImage.H>
00048 #include <qgarlib/QgarErrorDomain.H>
00049 
00050 
00051 
00052 namespace qgar
00053 {
00054 
00055 /**
00056  * @class CloseBinaryImage CloseBinaryImage.H "qgarlib/CloseBinaryImage.H"
00057  * @ingroup IMGPROC_MORPH
00058  * @brief Closing of a binary image, using morphological operators.
00059  * 
00060  * The closing structural element is a square.
00061  * 
00062  * @todo Allow the use of other structural elements, like disks or crosses.
00063  *
00064  * @author <a href="mailto:qgar-develop@loria.fr?subject=Qgar fwd Mathieu Baeumler">Mathieu Baeumler</a>
00065  * @date   July 18, 2002  15:48
00066  * @since  Qgar 2.0
00067  */
00068 class CloseBinaryImage
00069 
00070   : public BinaryImage
00071 
00072 {
00073 // -------------------------------------------------------------------
00074 // P U B L I C    M E M B E R S
00075 // -------------------------------------------------------------------
00076 public:
00077 
00078   /** @name Constructors */
00079   //        ============
00080   //@{
00081   /**
00082    * @brief Construct the closing of a binary image.
00083    * @param anImg         image to be closed
00084    * @param aClosingSize  closing size
00085    * 
00086    * @exception qgar::QgarErrorDomain (closing size too large for image)
00087    */
00088   CloseBinaryImage(BinaryImage& anImg, unsigned int aClosingSize = 1)
00089     throw(QgarErrorDomain);
00090   //@}
00091 
00092   /** @name Closing */
00093   //        =======
00094   //@{
00095   /**
00096    * @brief Perform a closing of a given binary image.
00097    * @param anImg         image to be closed
00098    * @param aClosingSize  closing size
00099    *
00100    * <b>To be used to perform a closing without preserving
00101    * the initial image.</b>
00102    */
00103   static void perform(BinaryImage* anImg, unsigned int aClosingSize = 1);
00104   //@}
00105 
00106 // -------------------------------------------------------------------
00107 }; // class CloseBinaryImage
00108 
00109 
00110 } // namespace qgar
00111 
00112 
00113 #endif /* __CLOSEBINARYIMAGE_H_INCLUDED__ */