shapemodel.h

00001
00002 /***************************************************************************
00003  *  shapemodel.h - Abstract class defining a shape model
00004  *
00005  *  Generated: Tue May 03 19:50:02 2005
00006  *  Copyright  2005-2007  Tim Niemueller [www.niemueller.de]
00007  *             2005       Martin Heracles <Martin.Heracles@rwth-aachen.de>
00008  *             2005       Hu Yuxiao      <Yuxiao.Hu@rwth-aachen.de>
00009  *
00010  ****************************************************************************/
00011
00012 /*  This program is free software; you can redistribute it and/or modify
00013  *  it under the terms of the GNU General Public License as published by
00014  *  the Free Software Foundation; either version 2 of the License, or
00015  *  (at your option) any later version. A runtime exception applies to
00016  *  this software (see LICENSE.GPL_WRE file mentioned below for details).
00017  *
00018  *  This program is distributed in the hope that it will be useful,
00019  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
00020  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00021  *  GNU Library General Public License for more details.
00022  *
00023  *  Read the full text in the LICENSE.GPL_WRE file in the doc directory.
00024  */
00025
00026 #ifndef __FIREVISION_MODELS_SHAPE_SHAPEMODEL_H_
00027 #define __FIREVISION_MODELS_SHAPE_SHAPEMODEL_H_
00028 
00029 #include <string>
00030 #include <vector>
00031
00032 class ROI;
00033
00034 class Shape
00035 {
00036  public:
00037   virtual ~Shape();
00038
00039   virtual void setMargin( unsigned int margin )                      = 0;
00040   virtual bool isClose(unsigned int in_roi_x, unsigned int in_roi_y) = 0;
00041
00042 };
00043
00044 class ShapeModel
00045 {
00046 public:
00047   virtual   ~ShapeModel();
00048   virtual   std::string            getName(void)        const                     = 0;
00049   virtual   int                    parseImage( unsigned char* buffer, ROI *roi )  = 0;
00050   virtual   int                    getShapeCount(void) const                      = 0;
00051   virtual   Shape*                 getShape(int id) const                         = 0;
00052   virtual   Shape*                 getMostLikelyShape(void) const                 = 0;
00053 };
00054
00055 #endif