/usr/include/mia-2.2/mia/2d/perfusion.hh is in libmia-2.2-dev 2.2.7-3.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 | /* -*- mia-c++ -*-
*
* This file is part of MIA - a toolbox for medical image analysis
* Copyright (c) Leipzig, Madrid 1999-2015 Gert Wollny
*
* MIA is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with MIA; if not, see <http://www.gnu.org/licenses/>.
*
*/
#ifndef mia_2d_perfusion_hh
#define mia_2d_perfusion_hh
#include <vector>
#include <mia/core/dictmap.hh>
#include <mia/core/waveletslopeclassifier.hh>
#include <mia/2d/image.hh>
#include <mia/2d/filter.hh>
NS_MIA_BEGIN
/**
@ingroup perf
@brief A class to run an ICA on a heart perfusion series
This class provides the tools for ICA based 2D perfusion image series. This class is specifically
designed for the analysis of free breathingly aquired myocardial perfusion images.
*/
class EXPORT_2D C2DPerfusionAnalysis {
public:
/// Possible bases for LV-RV heart segmentation
enum EBoxSegmentation {
bs_delta_feature, /*!< Segmentation based on the difference of the LV and RV feature images */
bs_delta_peak, /*!< Segmentation based on the difference of the LV and RV peak enhancenemt images */
bs_features, /*!< Segmentation based on the LV and RV feature images */
bs_unknown /*!< place holder */
};
/**
Constructor
\param components number of independend components, 0 = auto estimate from [3,4,5,6,7]
\param normalize normalize feature images
\param meanstrip strip mean from mixing time curves
*/
C2DPerfusionAnalysis(size_t components, bool normalize,
bool meanstrip);
/**
Set the number of ICA iterations
@param maxiter
*/
void set_max_ica_iterations(size_t maxiter);
~C2DPerfusionAnalysis();
/**
Run the ICA analysis - keeps a copy of the image series
\param series image series should contain more images thennumber of requested components
*/
bool run(const std::vector<C2DFImage>& series);
/**
\returns \a true if a periodic component could be identified in the given series
*/
bool has_movement() const;
/**
Evaluate an image cropping filter. This code is specifically designed to deal
with the segmentantion of the left heart ventricle in short axis heart MRI
The algorithm evaluates the centers of the LV and the RV and uses the distance
between both to estimata a bounding box.
Some heuristics are used to check whether the segmentation makes sense
@param scale enlargement scale of the bounding box to create the cropping region
@param[out] crop_start returns the left upper corner of the cropping region that can be used
to adjust segmentations
@param approach on what input data to base thesegmentation on
@param save_features if not empty store feature images in files with this prefix
@returns the cropping filter or C2DFilterPlugin::ProductPtr() if the segmentation fails.
*/
P2DFilter get_crop_filter(float scale, C2DBounds& crop_start,
EBoxSegmentation approach,
const std::string& save_features="") const;
/**
Create uncropped reference images that try to omit the movement component in the image series.
*/
std::vector<C2DFImage> get_references() const;
/**
Set the ICA seperation approach
\param approach FICA_APPROACH_SYMM or FICA_APPROACH_DEFL
\todo the parameter should be an enum
*/
void set_approach(size_t approach);
/**
\returns the RV peak enhancement IC index of -1 if it could not be identified
*/
int get_RV_peak_idx() const __attribute__((deprecated));
/**
\returns the RV enhancement IC index of -1 if it could not be identified
*/
int get_RV_idx() const;
/**
\returns the LV peak enhancement IC index of -1 if it could not be identified
*/
int get_LV_peak_idx() const __attribute__((deprecated));
/**
\returns the LV enhancement IC index of -1 if it could not be identified
*/
int get_LV_idx() const;
/**
Set the minimum mean frequency (in breath per heart beat) that decides whether a slope is
considered to be periodic.
\param min_freq The new minimum frequency, a value < 0.0 disables the test (this is the default)
\remark this values is simply passed through to the wavelet slope classifier
*/
void set_min_movement_frequency(float min_freq);
/**
\returns the perfusion enhancement IC index of -1 if it could not be identified
*/
int get_perfusion_idx() const;
/**
Dictionary for segmentation method flags
*/
static TDictMap<EBoxSegmentation> segmethod_dict;
/**
Use an experimental model to create a initial guess.
*/
void set_use_guess_model();
/**
Save the mixin matrix to a file.
@param coefs_name output file name
*/
void save_coefs(const std::string& coefs_name)const;
/**
Save the feature image to some PNG files.
@param base_name output file name base
*/
void save_feature_images(const std::string& base_name)const;
/**
@param index of the feature image requested, set negative to request the mean image.
\returns the requested feature image
*/
P2DImage get_feature_image(int index) const;
/**
@returns the LV maximum peak enhancement time index, or -1 if not identified
*/
int get_LV_peak_time() const;
/**
@returns the RV maximum peak enhancement time index, or -1 if not identified
*/
int get_RV_peak_time() const;
private:
struct C2DPerfusionAnalysisImpl *impl;
};
NS_MIA_END
#endif
|