00001 /***************************************************************** 00002 * 00003 * This file is part of the FLIRTLib project 00004 * 00005 * FLIRTLib Copyright (c) 2010 Gian Diego Tipaldi and Kai O. Arras 00006 * 00007 * This software is licensed under the "Creative Commons 00008 * License (Attribution-NonCommercial-ShareAlike 3.0)" 00009 * and is copyrighted by Gian Diego Tipaldi and Kai O. Arras 00010 * 00011 * Further information on this license can be found at: 00012 * http://creativecommons.org/licenses/by-nc-sa/3.0/ 00013 * 00014 * FLIRTLib is distributed in the hope that it will be useful, 00015 * but WITHOUT ANY WARRANTY; without even the implied 00016 * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 00017 * PURPOSE. 00018 * 00019 *****************************************************************/ 00020 00021 00022 00023 #ifndef MULTISCALECURVATUREDETECTORPRESENTER_H_ 00024 #define MULTISCALECURVATUREDETECTORPRESENTER_H_ 00025 00026 #include <gui/PeakFinderPresenter.h> 00027 #include <gui/DetectorPresenter.h> 00028 #include <gui/ParameterWidget.h> 00029 #include <feature/CurvatureDetector.h> 00030 #include <QtCore/QVector> 00031 #include <QtCore/QObject> 00032 #include <QtCore/QString> 00033 00034 class MultiScaleCurvatureDetectorPresenter: public DetectorPresenter{ 00035 Q_OBJECT 00036 00037 public: 00038 MultiScaleCurvatureDetectorPresenter(CurvatureDetector* detector, ParameterWidget* detectorParameter); 00039 00040 virtual void activate(); 00041 00042 virtual void deactivate(); 00043 00044 void insertPeakFinder(const QString& name, PeakFinderPresenter* peak); 00045 00046 void setDetector(Detector* detector); 00047 00048 void setDetectorParameter(ParameterWidget* detectorParameter); 00049 00050 signals: 00051 void detectorChanged(); 00052 00053 public slots: 00054 void changeParameter(const QString& name); 00055 00056 void changeMaxRange(int check); 00057 void changeScale(int scale); 00058 void changeSigma(double sigma); 00059 void changeSigmaStep(double step); 00060 void changeDmst(int dmst); 00061 void changePeakFinder(int peakFinder); 00062 00063 protected: 00064 virtual void syncronize(); 00065 virtual void reconnect(); 00066 00067 PeakFinderPresenter* m_currentPeakPresenter; 00068 int m_currentPeakPresenterIndex; 00069 QVector< PeakFinderPresenter* > m_peakPresenters; 00070 QStringList m_peakPresenterNames; 00071 }; 00072 00073 #endif