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
39template <int dim>
41{
42public:
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;
63 size_t reference, size_t max_delta);
64
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;
77private:
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
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.
std::vector< size_t > get_periodic_subset() const
this_dim_trait::PImage PImage
pointer type for the actual images
float get_peak_frequency() const
this_dim_trait::ImageSeries ImageSeries
type of the image series to create the similarity profile from
TSimilarityProfile(const TSimilarityProfile< dim > &org)=default
copy constructor
dimension_traits< dim > this_dim_trait
the trait to handle dimension based typedefs
TSimilarityProfile(PFullCost cost, const ImageSeries &images, size_t reference, size_t max_delta)
#define EXPORT_HANDLER
Definition: core/cost.hh:32
#define NS_MIA_BEGIN
conveniance define to start the mia namespace
Definition: defines.hh:33
#define NS_MIA_END
conveniance define to end the mia namespace
Definition: defines.hh:36