GeopsyCore/TaperParameters.h
Go to the documentation of this file.
00001 /***************************************************************************
00002 **
00003 **  This file is part of GeopsyCore.
00004 **
00005 **  This library is free software; you can redistribute it and/or
00006 **  modify it under the terms of the GNU Lesser General Public
00007 **  License as published by the Free Software Foundation; either
00008 **  version 2.1 of the License, or (at your option) any later version.
00009 **
00010 **  This file is distributed in the hope that it will be useful, but WITHOUT
00011 **  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
00012 **  FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
00013 **  License for more details.
00014 **
00015 **  You should have received a copy of the GNU Lesser General Public
00016 **  License along with this library; if not, write to the Free Software
00017 **  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
00018 **
00019 **  See http://www.geopsy.org for more information.
00020 **
00021 **  Created: 2011-11-18
00022 **  Authors:
00023 **    Marc Wathelet (ISTerre, Grenoble, France)
00024 **
00025 ***************************************************************************/
00026 
00027 #ifndef TAPERPARAMETERS_H
00028 #define TAPERPARAMETERS_H
00029 
00030 #include <QGpCoreTools.h>
00031 
00032 #include "GeopsyCoreDLLExport.h"
00033 #include "TimeRange.h"
00034 
00035 namespace GeopsyCore {
00036 
00037   class GEOPSYCORE_EXPORT TaperParameters: public AbstractParameters
00038   {
00039   public:
00040     TaperParameters();
00041     TaperParameters(const TaperParameters& o);
00042 
00043     enum Window {Rectangular, Hann, Hamming, Tukey, Cosine, Lanczos, Bartlett, Triangular,
00044                  Gaussian, BartlettHann, Blackman, Nuttall, BlackmanHarris,
00045                  BlackmanNuttall, FlatTop};
00046 
00047     Window window() const {return _window;}
00048     void setWindow(Window w) {_window=w;}
00049     QString windowString() const;
00050     void setWindow(const QString& w);
00051 
00052     bool reversed() const {return _reversed;}
00053     void setReversed(bool r) {_reversed=r;}
00054 
00055     double alpha() const {return _alpha;}
00056     void setAlpha(double a) {_alpha=a;}
00057 
00058     double sigma() const {return _sigma;}
00059     void setSigma(double s) {_sigma=s;}
00060 
00061     virtual void collectKeywords(PARAMETERS_COLLECTKEYWORDS_ARGS);
00062     virtual int keywordCount(PARAMETERS_KEYWORDCOUNT_ARGS);
00063     virtual bool setValue(PARAMETERS_SETVALUE_ARGS);
00064     virtual QString toString(PARAMETERS_TOSTRING_ARGS_DECL) const;
00065   private:
00066     Window _window:28;
00067     bool _reversed:1;
00068     union {
00069       double _alpha;
00070       double _sigma;
00071     };
00072   };
00073 
00074 } // namespace GeopsyCore
00075 
00076 #endif // TAPERPARAMETERS_H
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Defines