perfusion.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_2d_perfusion_hh
22 #define mia_2d_perfusion_hh
23 
24 #include <vector>
25 #include <mia/core/dictmap.hh>
27 #include <mia/core/ica.hh>
28 #include <mia/2d/image.hh>
29 #include <mia/2d/filter.hh>
30 
31 
33 
43 public:
49  bs_unknown
50  };
57  C2DPerfusionAnalysis(size_t components, bool normalize,
58  bool meanstrip);
59 
60 
65  void set_max_ica_iterations(size_t maxiter);
66 
68 
75  bool run(const std::vector<C2DFImage>& series, const CIndepCompAnalysisFactory& icatool);
76 
77 
81  bool has_movement() const;
82 
97  P2DFilter get_crop_filter(float scale, C2DBounds& crop_start,
98  EBoxSegmentation approach,
99  const std::string& save_features="") const;
100 
101 
105  std::vector<C2DFImage> get_references() const;
106 
112  void set_approach(CIndepCompAnalysis::EApproach approach);
113 
117  int get_RV_peak_idx() const __attribute__((deprecated));
118 
122  int get_RV_idx() const;
123 
127  int get_LV_peak_idx() const __attribute__((deprecated));
128 
132  int get_LV_idx() const;
133 
134 
141  void set_min_movement_frequency(float min_freq);
142 
143 
147  int get_perfusion_idx() const;
148 
152  int get_movement_idx() const;
153 
154 
158  static TDictMap<EBoxSegmentation> segmethod_dict;
159 
163  void set_use_guess_model();
164 
165 
170  void save_coefs(const std::string& coefs_name)const;
171 
176  void save_feature_images(const std::string& base_name)const;
177 
182  P2DImage get_feature_image(int index) const;
183 
187  int get_LV_peak_time() const;
188 
192  int get_RV_peak_time() const;
193 
199  std::vector<float> get_mixing_curve(unsigned idx) const;
200 
201 private:
202  struct C2DPerfusionAnalysisImpl *impl;
203 
204 };
205 
207 
208 #endif
C2DImage::Pointer P2DImage
Shared pointer representation of the 2D Image.
Definition: 2d/image.hh:119
EBoxSegmentation
Possible bases for LV-RV heart segmentation.
Definition: perfusion.hh:45
class EXPORT_CORE CMeans private
std::shared_ptr< Image > normalize(const Image &image)
a normalizer for image intensities
Definition: normalize.hh:131
#define NS_MIA_BEGIN
conveniance define to start the mia namespace
Definition: defines.hh:33
A class to run an ICA on a heart perfusion series.
Definition: perfusion.hh:42
std::shared_ptr< C2DFilter > P2DFilter
Definition: 2d/filter.hh:48
#define EXPORT_2DMYOCARD
Definition: defines2d.hh:53
A mapper from emums to string values. - usefull for names flags.
Definition: dictmap.hh:45
#define NS_MIA_END
conveniance define to end the mia namespace
Definition: defines.hh:36