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 public:
43  typedef dimension_traits<dim> this_dim_trait;
44 
46  typedef typename this_dim_trait::PFullCost PFullCost;
47 
49  typedef typename this_dim_trait::ImageSeries ImageSeries;
50 
52  typedef typename this_dim_trait::PImage PImage;
61  TSimilarityProfile(PFullCost cost, const ImageSeries& images,
62  size_t reference, size_t max_delta);
63 
65  TSimilarityProfile(const TSimilarityProfile<dim>& org) = default;
66 
68  TSimilarityProfile<dim>& operator = (const TSimilarityProfile<dim>& org) = default;
69 
70 
72  float get_peak_frequency() const;
73 
75  std::vector<size_t> get_periodic_subset() const;
76 private:
77  size_t m_skip;
78  mutable float m_peak_freq;
79  mutable bool m_peak_freq_valid;
80  size_t m_reference;
81  size_t m_max_delta;
82  std::vector<CFFT1D_R2C::Real> m_cost_values;
83 };
84 
86 
87 #endif
this_dim_trait::ImageSeries ImageSeries
type of the image series to create the similarity profile from
this_dim_trait::PImage PImage
pointer type for the actual images
#define NS_MIA_BEGIN
conveniance define to start the mia namespace
Definition: defines.hh:33
#define EXPORT_HANDLER
Definition: core/cost.hh:32
dimension_traits< dim > this_dim_trait
the trait to handle dimension based typedefs
A class to evaluate image similarity profiles of image series.
this_dim_trait::PFullCost PFullCost
Pointer type for cost measure used to create the similarity profile.
#define NS_MIA_END
conveniance define to end the mia namespace
Definition: defines.hh:36