Chris@283: /* -*- c-basic-offset: 4 indent-tabs-mode: nil -*-  vi:set ts=8 sts=4 sw=4: */
Chris@283: 
Chris@283: /*
Chris@283:     Sonic Visualiser
Chris@283:     An audio file viewer and annotation editor.
Chris@283:     Centre for Digital Music, Queen Mary, University of London.
Chris@283:     This file copyright 2007 QMUL.
Chris@283:     
Chris@283:     This program is free software; you can redistribute it and/or
Chris@283:     modify it under the terms of the GNU General Public License as
Chris@283:     published by the Free Software Foundation; either version 2 of the
Chris@283:     License, or (at your option) any later version.  See the file
Chris@283:     COPYING included with this distribution for more information.
Chris@283: */
Chris@283: 
Chris@1407: #ifndef SV_IMAGE_REGION_FINDER_H
Chris@1407: #define SV_IMAGE_REGION_FINDER_H
Chris@283: 
Chris@283: #include <QColor>
Chris@283: #include <QRect>
Chris@283: 
Chris@283: class QImage;
Chris@283: 
Chris@283: class ImageRegionFinder
Chris@283: {
Chris@283: public:
Chris@283:     ImageRegionFinder();
Chris@283:     virtual ~ImageRegionFinder();
Chris@283: 
Chris@283:     QRect findRegionExtents(QImage *image, QPoint origin) const;
Chris@283: 
Chris@283: protected:
Chris@283:     bool similar(QRgb a, QRgb b) const;
Chris@283: };
Chris@283: 
Chris@283: #endif
Chris@283: