My Project
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-2017 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 {
41 public:
46  ecp_none = 0,
49  ecp_end
50  };
51 
57  CSlopeStatistics(const std::vector<float>& series, int index);
58 
62  CSlopeStatistics(const CSlopeStatistics& other) = delete;
63 
65 
67  float get_curve_length() const;
68 
70  float get_range() const;
71 
73  float get_mean_frequency() const;
74 
76  int get_max_frequency_slot() const;
77 
78 
80  float get_energy() const;
81 
83  float get_mean_frequency_level() const;
84 
86  std::pair<int, int> get_peak_level_and_time_index() const;
87 
92  float get_maximum_gradient_from_zero() const;
93 
95  float get_peak_wavelet_coefficient() const;
96 
98  float get_wavelet_energy() const;
99 
101  std::pair<size_t, float> get_first_peak() const;
102 
104  std::pair<size_t, float> get_second_peak() const;
105 
107  std::pair<size_t, float> get_perfusion_high_peak() const;
108 
112  std::pair<size_t, float> get_gradient_peak(int start_movement) const;
113 
114 
118  const std::vector<float>& get_level_coefficient_sums() const;
119 
124  const std::vector<EEnergyCenterpos>& get_level_mean_energy_position() const;
125 
126 
130  CSlopeStatistics::EEnergyCenterpos get_mean_energy_position() const;
131 
136  float get_positive_time_mean() const;
137 
144  float get_level_change(size_t center) const;
145 
149  int get_index() const;
150 private:
151  struct CSlopeStatisticsImpl *impl;
152 };
153 
155 typedef std::shared_ptr<CSlopeStatistics > PSlopeStatistics;
157 
158 #endif // mia_core_slopestatistics_hh
NS_MIA_BEGIN
#define NS_MIA_BEGIN
conveniance define to start the mia namespace
Definition: defines.hh:33
CSlopeStatistics::ecp_begin
@ ecp_begin
Definition: slopestatistics.hh:47
NS_MIA_END
#define NS_MIA_END
conveniance define to end the mia namespace
Definition: defines.hh:36
CSlopeStatistics::ecp_center
@ ecp_center
Definition: slopestatistics.hh:48
PSlopeStatistics
std::shared_ptr< CSlopeStatistics > PSlopeStatistics
Pointer type for the CSlopeStatistics class.
Definition: slopestatistics.hh:155
CSlopeStatistics
Runs some statistics over a one-dimensional curve.
Definition: slopestatistics.hh:39
CSlopeStatistics::EEnergyCenterpos
EEnergyCenterpos
Definition: slopestatistics.hh:45
EXPORT_CORE
#define EXPORT_CORE
Macro to manage Visual C++ style dllimport/dllexport.
Definition: defines.hh:101
defines.hh