From: <fm...@us...> - 2008-06-24 17:27:45
|
Revision: 3144 http://hugin.svn.sourceforge.net/hugin/?rev=3144&view=rev Author: fmannan Date: 2008-06-24 10:27:43 -0700 (Tue, 24 Jun 2008) Log Message: ----------- +Added ISegmentation.h Added Paths: ----------- hugin/branches/gsoc2008_masking/src/maskeditor/core/ISegmentation.h Added: hugin/branches/gsoc2008_masking/src/maskeditor/core/ISegmentation.h =================================================================== --- hugin/branches/gsoc2008_masking/src/maskeditor/core/ISegmentation.h (rev 0) +++ hugin/branches/gsoc2008_masking/src/maskeditor/core/ISegmentation.h 2008-06-24 17:27:43 UTC (rev 3144) @@ -0,0 +1,57 @@ +// -*- c-basic-offset: 4 -*- +/** @file ISegmentation.h + * + * @author Fahim Mannan <fm...@gm...> + * + * $Id$ + * + * This is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This software is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU General Public + * License along with this software; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + */ + +#ifndef ISEGMENTATION_H +#define ISEGMENTATION_H +#include <wx/wx.h> +#include <vector> +#include "BrushStroke.h" +#include "MaskPoly.h" +class ISegmentation +{ +protected: + std::string m_name; //segmentation technique + std::string m_filename; + unsigned char* m_mask; +public: + enum Label { BKGND, FGND }; + /* struct PixelCoord + { + int r, c; + };*/ + typedef wxPoint PixelCoord; + + ISegmentation() : m_mask(0) {} + virtual ~ISegmentation() { delete m_mask; } + virtual void init() = 0; + virtual void reset() = 0; + std::string name() { return m_name; } + virtual void markPixels(std::vector<PixelCoord> coords, Label label) = 0; + virtual void setRegion(std::vector<PixelCoord> coords, Label label) = 0; + virtual void setImage(unsigned char* data, int row, int col, int depth) = 0; + virtual void setImage(const std::string &filename) = 0; + virtual wxMask* getMask() const = 0; + virtual wxBitmap* getMaskBitmap() const = 0; +}; + +#endif This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |