slopestatistics.hh
Go to the documentation of this file.
1 /* -*- mia-c++ -*-
2  *
3  * This file is part of MIA - a toolbox for medical image analysis
4  * Copyright (c) Leipzig, Madrid 1999-2013 Gert Wollny
5  *
6  * MIA is free software; you can redistribute it and/or modify
7  * it under the terms of the GNU General Public License as published by
8  * the Free Software Foundation; either version 3 of the License, or
9  * (at your option) any later version.
10  *
11  * This program is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14  * GNU General Public License for more details.
15  *
16  * You should have received a copy of the GNU General Public License
17  * along with MIA; if not, see <http://www.gnu.org/licenses/>.
18  *
19  */
20 
21 #ifndef mia_core_slopestatistics_hh
22 #define mia_core_slopestatistics_hh
23 
24 #include <vector>
25 #include <memory>
26 #include <mia/core/defines.hh>
27 
29 
30 
40 public:
45  ecp_none = 0,
48  ecp_end
49  };
50 
56  CSlopeStatistics(const std::vector<float>& series, int index);
57 
61  CSlopeStatistics(const CSlopeStatistics& other) = delete;
62 
64 
66  float get_curve_length() const;
67 
69  float get_range() const;
70 
72  float get_mean_frequency() const;
73 
75  float get_energy() const;
76 
78  float get_mean_frequency_level() const;
79 
81  std::pair<int, int> get_peak_level_and_time_index() const;
82 
87  float get_maximum_gradient_from_zero() const;
88 
90  float get_peak_wavelet_coefficient() const;
91 
93  float get_wavelet_energy() const;
94 
96  std::pair<size_t, float> get_first_peak() const;
97 
99  std::pair<size_t, float> get_second_peak() const;
100 
102  std::pair<size_t, float> get_perfusion_high_peak() const;
103 
107  std::pair<size_t, float> get_gradient_peak(int start_movement) const;
108 
109 
113  const std::vector<float>& get_level_coefficient_sums() const;
114 
119  const std::vector<EEnergyCenterpos>& get_level_mean_energy_position() const;
120 
121 
125  CSlopeStatistics::EEnergyCenterpos get_mean_energy_position() const;
126 
131  float get_positive_time_mean() const;
132 
139  float get_level_change(size_t center) const;
140 
144  int get_index() const;
145 private:
146  struct CSlopeStatisticsImpl *impl;
147 };
148 
150 typedef std::shared_ptr<CSlopeStatistics > PSlopeStatistics;
152 
153 #endif // mia_core_slopestatistics_hh