www.pudn.com > firev0.01.rar > blob.hpp
/* This file is part of the FIRE -- Flexible Image Retrieval System FIRE 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. FIRE 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 General Public License for more details. You should have received a copy of the GNU General Public License along with FIRE; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ #ifndef __blob_hpp #define __blob_hpp #include#include "rgbimage.hpp" #include "image.hpp" #include "colorpixel.hpp" #include "basefeature.hpp" class Blob : public BaseFeature { public: Blob() { data_=vector (235); } const double xCenter() const { return data_[3]; } const double yCenter() const { return data_[4]; } const double operator[](const unsigned int a) const { return data_[a]; } const int regionSize() const { return int(data_[12]); } double& operator[](const unsigned int a) { return data_[a]; } const unsigned int size() const {return 235;} private: vector data_; }; inline ::std::ostream& operator<<(::std::ostream& os, const Blob& src) { os << src[0]; for(unsigned int i=1;i