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 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  int get_max_frequency_slot() const;
76 
77 
79  float get_energy() const;
80 
82  float get_mean_frequency_level() const;
83 
85  std::pair<int, int> get_peak_level_and_time_index() const;
86 
91  float get_maximum_gradient_from_zero() const;
92 
94  float get_peak_wavelet_coefficient() const;
95 
97  float get_wavelet_energy() const;
98 
100  std::pair<size_t, float> get_first_peak() const;
101 
103  std::pair<size_t, float> get_second_peak() const;
104 
106  std::pair<size_t, float> get_perfusion_high_peak() const;
107 
111  std::pair<size_t, float> get_gradient_peak(int start_movement) const;
112 
113 
117  const std::vector<float>& get_level_coefficient_sums() const;
118 
123  const std::vector<EEnergyCenterpos>& get_level_mean_energy_position() const;
124 
125 
129  CSlopeStatistics::EEnergyCenterpos get_mean_energy_position() const;
130 
135  float get_positive_time_mean() const;
136 
143  float get_level_change(size_t center) const;
144 
148  int get_index() const;
149 private:
150  struct CSlopeStatisticsImpl *impl;
151 };
152 
154 typedef std::shared_ptr<CSlopeStatistics > PSlopeStatistics;
156 
157 #endif // mia_core_slopestatistics_hh
std::shared_ptr< CSlopeStatistics > PSlopeStatistics
Pointer type for the CSlopeStatistics class.
#define NS_MIA_BEGIN
conveniance define to start the mia namespace
Definition: defines.hh:33
#define EXPORT_CORE
Macro to manage Visual C++ style dllimport/dllexport.
Definition: defines.hh:101
Runs some statistics over a one-dimensional curve.
#define NS_MIA_END
conveniance define to end the mia namespace
Definition: defines.hh:36