detectionZivyWidget.h 2.15 KB
Newer Older
1
2
/*
 *
Langella Olivier's avatar
Langella Olivier committed
3
4
 *  File detectionWidget.h in
 *  MassChroQ: Mass Chromatogram Quantification software.
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
 *  Copyright (C) 2010 Olivier Langella, Edlira Nano, Benoit Valot, Michel Zivy.
 *
 *  This program 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 3 of the License, or any
 *  later version.
 *
 *  This program 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 this program; if not, see <http://www.gnu.org/licenses/>
 */

/**
Benoit Valot's avatar
Benoit Valot committed
22
23
24
25
 * \file detectionWidget.h
 * \date February 29, 2012
 * \author Edlira Nano
 */
26

Langella Olivier's avatar
Langella Olivier committed
27
#pragma once
28

Benoit Valot's avatar
Benoit Valot committed
29
#include "../masschroQWidget.h"
Langella Olivier's avatar
Langella Olivier committed
30
#include "../treatment/treatment_box_xic_detect.h"
31
#include <QWidget>
Langella Olivier's avatar
Langella Olivier committed
32
#include <pappsomspp/processing/detection/tracedetectionzivy.h>
33
34
35
36
37
38
39
40
41
42

class QDialogButtonBox;
class QVBoxLayout;
class QButtonGroup;
class QGroupBox;
class QSpinBox;

/**
 * \class DetectionZivyWidget
 * \brief Zivy peak detection method Widget
Langella Olivier's avatar
Langella Olivier committed
43
44
 *
 *
45
46
 **/

Langella Olivier's avatar
Langella Olivier committed
47
48
class DetectionZivyWidget : public MasschroQWidget
{
Benoit Valot's avatar
Benoit Valot committed
49

Langella Olivier's avatar
Langella Olivier committed
50
  Q_OBJECT
Benoit Valot's avatar
Benoit Valot committed
51

Langella Olivier's avatar
Langella Olivier committed
52
  public:
Langella Olivier's avatar
Langella Olivier committed
53
  DetectionZivyWidget(TreatmentBoxXicDetect *treatmentBox, QWidget *parent = 0);
Benoit Valot's avatar
Benoit Valot committed
54

Langella Olivier's avatar
Langella Olivier committed
55
  virtual ~DetectionZivyWidget();
Benoit Valot's avatar
Benoit Valot committed
56

Langella Olivier's avatar
Langella Olivier committed
57
  void writeElement(MasschroqDomDocument *domDocument) const;
Benoit Valot's avatar
Benoit Valot committed
58

Langella Olivier's avatar
Langella Olivier committed
59
  private slots:
60

Langella Olivier's avatar
Langella Olivier committed
61
  void detectPeaks();
62

Langella Olivier's avatar
Langella Olivier committed
63
64
65
66
67
  void setSmoothingFilterHalfWindow(int i);
  void setMinMaxFilterHalfWindow(int i);
  void setMaxMinFilterHalfWindow(int i);
  void setThresholdOnMax(double d);
  void setThresholdOnMin(double d);
Benoit Valot's avatar
Benoit Valot committed
68

Langella Olivier's avatar
Langella Olivier committed
69
  protected:
Langella Olivier's avatar
Langella Olivier committed
70
  std::shared_ptr<pappso::TraceDetectionZivy> _detection_method;
Langella Olivier's avatar
Langella Olivier committed
71
72
73
74
75
  int _smoothing_filter_half_window;
  int _minmax_filter_half_window;
  int _maxmin_filter_half_window;
  double _threshold_on_max;
  double _threshold_on_min;
76

Langella Olivier's avatar
Langella Olivier committed
77
  virtual void setWidgetParameters();
78

Langella Olivier's avatar
Langella Olivier committed
79
  private:
Langella Olivier's avatar
Langella Olivier committed
80
81
82
83
84
  QGroupBox *_parameter_group;
  QDialogButtonBox *_button_box;
  TreatmentBoxXicDetect *_p_treatmentBox;

  void initializeDetectionMethod();
Benoit Valot's avatar
Benoit Valot committed
85
};