My Project
template/similarity_profile.hh
Go to the documentation of this file.
1 
2 /* -*- mia-c++ -*-
3  *
4  * This file is part of MIA - a toolbox for medical image analysis
5  * Copyright (c) Leipzig, Madrid 1999-2017 Gert Wollny
6  *
7  * MIA is free software; you can redistribute it and/or modify
8  * it under the terms of the GNU General Public License as published by
9  * the Free Software Foundation; either version 3 of the License, or
10  * (at your option) any later version.
11  *
12  * This program is distributed in the hope that it will be useful,
13  * but WITHOUT ANY WARRANTY; without even the implied warranty of
14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15  * GNU General Public License for more details.
16  *
17  * You should have received a copy of the GNU General Public License
18  * along with MIA; if not, see <http://www.gnu.org/licenses/>.
19  *
20  */
21 
22 #ifndef mia_internal_similarity_profile_hh
23 #define mia_internal_similarity_profile_hh
24 
25 #include <mia/core/fft1d_r2c.hh>
27 
39 template <int dim>
41 {
42 public:
44  typedef dimension_traits<dim> this_dim_trait;
45 
47  typedef typename this_dim_trait::PFullCost PFullCost;
48 
50  typedef typename this_dim_trait::ImageSeries ImageSeries;
51 
53  typedef typename this_dim_trait::PImage PImage;
62  TSimilarityProfile(PFullCost cost, const ImageSeries& images,
63  size_t reference, size_t max_delta);
64 
66  TSimilarityProfile(const TSimilarityProfile<dim>& org) = default;
67 
69  TSimilarityProfile<dim>& operator = (const TSimilarityProfile<dim>& org) = default;
70 
71 
73  float get_peak_frequency() const;
74 
76  std::vector<size_t> get_periodic_subset() const;
77 private:
78  size_t m_skip;
79  mutable float m_peak_freq;
80  mutable bool m_peak_freq_valid;
81  size_t m_reference;
82  size_t m_max_delta;
83  std::vector<CFFT1D_R2C::Real> m_cost_values;
84 };
85 
87 
88 #endif
NS_MIA_BEGIN
#define NS_MIA_BEGIN
conveniance define to start the mia namespace
Definition: defines.hh:33
import_handler.hh
TSimilarityProfile
A class to evaluate image similarity profiles of image series.
Definition: template/similarity_profile.hh:40
NS_MIA_END
#define NS_MIA_END
conveniance define to end the mia namespace
Definition: defines.hh:36
EXPORT_HANDLER
#define EXPORT_HANDLER
Definition: core/cost.hh:32
fft1d_r2c.hh
TSimilarityProfile::ImageSeries
this_dim_trait::ImageSeries ImageSeries
type of the image series to create the similarity profile from
Definition: template/similarity_profile.hh:50
TSimilarityProfile::this_dim_trait
dimension_traits< dim > this_dim_trait
the trait to handle dimension based typedefs
Definition: template/similarity_profile.hh:44
TSimilarityProfile::PFullCost
this_dim_trait::PFullCost PFullCost
Pointer type for cost measure used to create the similarity profile.
Definition: template/similarity_profile.hh:47
TSimilarityProfile::PImage
this_dim_trait::PImage PImage
pointer type for the actual images
Definition: template/similarity_profile.hh:53