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

ltiSegmentation.h

00001 /*
00002  * Copyright (C) 1999, 2000, 2001, 2002, 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 Digital Image/Signal Processing Library
00026  * file .......: ltiSegmentation.h
00027  * authors ....: Pablo Alvarado
00028  * organization: LTI, RWTH Aachen
00029  * creation ...: 24.08.99
00030  * revisions ..: $Id: ltiSegmentation.h,v 1.7 2006/02/08 11:49:23 ltilib Exp $
00031  */
00032 
00033 #ifndef _LTI_SEGMENTATION_H_
00034 #define _LTI_SEGMENTATION_H_
00035 
00036 #include "ltiObject.h"
00037 #include "ltiFunctor.h"
00038 #include "ltiException.h"
00039 #include "ltiTypes.h"
00040 
00041 namespace lti  {
00042   /**
00043    * Base class for all segmentation algorithms
00044    */
00045   class segmentation : public functor {
00046   public:
00047 
00048     /**
00049      * Parameters for all segmentation algorithms
00050      */
00051     class parameters : public functor::parameters {
00052     public:
00053       /**
00054        * default constructor
00055        */
00056       parameters();
00057 
00058       /**
00059        * copy constructor
00060        */
00061       parameters(const parameters& other) : functor::parameters() {
00062         copy(other);
00063       };
00064 
00065       /**
00066        * destructor
00067        */
00068       virtual ~parameters();
00069 
00070       /**
00071        * copy data of "other" parameters
00072        */
00073       parameters& copy(const parameters& other);
00074 
00075       /**
00076        * returns a pointer to a clone of the parameters.
00077        */
00078       virtual functor::parameters* clone() const;
00079 
00080       /**
00081        * returns the name of this type
00082        */
00083       virtual const char* getTypeName() const;
00084 
00085       /**
00086        * write the parameters in the given ioHandler
00087        * @param handler the ioHandler to be used
00088        * @param complete if true (the default) the enclosing begin/end will
00089        *        be also written, otherwise only the data block will be written.
00090        * @return true if write was successful
00091        */
00092       virtual bool write(ioHandler& handler,
00093                          const bool complete=true) const;
00094 
00095       /**
00096        * write the parameters in the given ioHandler
00097        * @param handler the ioHandler to be used
00098        * @param complete if true (the default) the enclosing begin/end will
00099        *        be also written, otherwise only the data block will be written.
00100        * @return true if write was successful
00101        */
00102       virtual bool read(ioHandler& handler,const bool complete=true);
00103 
00104 #     ifdef _LTI_MSC_6
00105       /**
00106        * this function is required by MSVC only, as a workaround for a
00107        * very awful bug, which exists since MSVC V.4.0, and still by
00108        * V.6.0 with all bugfixes (so called "service packs") remains
00109        * there...  This method is public due to another bug!, so please
00110        * NEVER EVER call this method directly
00111        */
00112       bool readMS(ioHandler& handler,const bool complete=true);
00113 
00114       /**
00115        * this function is required by MSVC only, as a workaround for a
00116        * very awful bug, which exists since MSVC V.4.0, and still by
00117        * V.6.0 with all bugfixes (so called "service packs") remains
00118        * there...  This method is public due to another bug!, so please
00119        * NEVER EVER call this method directly
00120        */
00121       bool writeMS(ioHandler& handler,const bool complete=true) const;
00122 #     endif
00123     };
00124 
00125     /**
00126      * default constructor
00127      */
00128     segmentation() : functor() {};
00129 
00130     /**
00131      * copy constructor
00132      */
00133     segmentation(const segmentation& other) : functor() {
00134       copy(other);
00135     };
00136 
00137     /**
00138      * destructor
00139      */
00140     virtual ~segmentation();
00141 
00142     /**
00143      * copy data of "other" functor.
00144      */
00145     segmentation& copy(const segmentation& other);
00146 
00147     /**
00148      * clone member
00149      */
00150     virtual functor* clone() const;
00151 
00152     /**
00153      * returns the name of this type
00154      */
00155     virtual const char* getTypeName() const;
00156   };
00157 } // namespace lti
00158 
00159 #endif

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