My Project
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 {
44 public:
50  bs_unknown
51  };
58  C2DPerfusionAnalysis(size_t components, bool normalize,
59  bool meanstrip);
60 
61 
66  void set_max_ica_iterations(size_t maxiter);
67 
69 
76  bool run(const std::vector<C2DFImage>& series, const CIndepCompAnalysisFactory& icatool);
77 
78 
82  bool has_movement() const;
83 
98  P2DFilter get_crop_filter(float scale, C2DBounds& crop_start,
99  EBoxSegmentation approach,
100  const std::string& save_features = "") const;
101 
102 
106  std::vector<C2DFImage> get_references() const;
107 
113  void set_approach(CIndepCompAnalysis::EApproach approach);
114 
118  int get_RV_peak_idx() const __attribute__((deprecated));
119 
123  int get_RV_idx() const;
124 
128  int get_LV_peak_idx() const __attribute__((deprecated));
129 
133  int get_LV_idx() const;
134 
135 
142  void set_min_movement_frequency(float min_freq);
143 
144 
148  int get_perfusion_idx() const;
149 
153  int get_movement_idx() const;
154 
155 
159  static TDictMap<EBoxSegmentation> segmethod_dict;
160 
164  void set_use_guess_model();
165 
166 
171  void save_coefs(const std::string& coefs_name)const;
172 
177  void save_feature_images(const std::string& base_name)const;
178 
183  P2DImage get_feature_image(int index) const;
184 
188  int get_LV_peak_time() const;
189 
193  int get_RV_peak_time() const;
194 
200  std::vector<float> get_mixing_curve(unsigned idx) const;
201 
202 private:
203  struct C2DPerfusionAnalysisImpl *impl;
204 
205 };
206 
208 
209 #endif
C2DPerfusionAnalysis::run
bool run(const std::vector< C2DFImage > &series, const CIndepCompAnalysisFactory &icatool)
waveletslopeclassifier.hh
C2DPerfusionAnalysis::set_approach
void set_approach(CIndepCompAnalysis::EApproach approach)
NS_MIA_BEGIN
#define NS_MIA_BEGIN
conveniance define to start the mia namespace
Definition: defines.hh:33
C2DPerfusionAnalysis
A class to run an ICA on a heart perfusion series.
Definition: perfusion.hh:43
ica.hh
C2DPerfusionAnalysis::get_references
std::vector< C2DFImage > get_references() const
dictmap.hh
NS_MIA_END
#define NS_MIA_END
conveniance define to end the mia namespace
Definition: defines.hh:36
P2DImage
C2DImage::Pointer P2DImage
Shared pointer representation of the 2D Image.
Definition: 2d/image.hh:120
T2DVector< unsigned int >
EXPORT_2DMYOCARD
#define EXPORT_2DMYOCARD
Definition: defines2d.hh:53
C2DPerfusionAnalysis::bs_delta_feature
@ bs_delta_feature
Definition: perfusion.hh:47
filter.hh
C2DPerfusionAnalysis::~C2DPerfusionAnalysis
~C2DPerfusionAnalysis()
C2DPerfusionAnalysis::has_movement
bool has_movement() const
C2DPerfusionAnalysis::get_crop_filter
P2DFilter get_crop_filter(float scale, C2DBounds &crop_start, EBoxSegmentation approach, const std::string &save_features="") const
normalize
std::shared_ptr< Image > normalize(const Image &image)
a normalizer for image intensities
Definition: normalize.hh:135
C2DPerfusionAnalysis::C2DPerfusionAnalysis
C2DPerfusionAnalysis(size_t components, bool normalize, bool meanstrip)
TDictMap
A mapper from emums to string values. - usefull for names flags.
Definition: dictmap.hh:46
C2DPerfusionAnalysis::set_max_ica_iterations
void set_max_ica_iterations(size_t maxiter)
P2DFilter
std::shared_ptr< C2DFilter > P2DFilter
Definition: 2d/filter.hh:48
C2DPerfusionAnalysis::bs_delta_peak
@ bs_delta_peak
Definition: perfusion.hh:48
std
Definition: gsl_iterator.hh:324
C2DPerfusionAnalysis::bs_features
@ bs_features
Definition: perfusion.hh:49
C2DPerfusionAnalysis::get_RV_peak_idx
int get_RV_peak_idx() const __attribute__((deprecated))
C2DPerfusionAnalysis::EBoxSegmentation
EBoxSegmentation
Possible bases for LV-RV heart segmentation.
Definition: perfusion.hh:46
image.hh