groundtruthproblem.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_ground_truth_problem_hh
22 #define mia_2d_ground_truth_problem_hh
23 
24 #include <mia/core/minimizer.hh>
26 
27 
29 
43 public:
44 
56  GroundTruthProblem(double a, double b,
57  const C2DBounds& slice_size,
58  size_t nframes,
59  const CDoubleVector& left_side,
61 
65  void set_alpha_beta(double a, double b);
66 
67 protected:
68 
70  const std::vector<double>& get_spacial_gradient() const;
71 
73  const std::vector<double>& get_time_derivative() const;
74 private:
75  virtual double do_f(const CDoubleVector& x);
76  virtual void do_df(const CDoubleVector& x, CDoubleVector& g);
77  virtual double do_fdf(const CDoubleVector& x, CDoubleVector& g);
78  size_t do_size() const;
79 
80  double evaluate_spacial_gradients(const CDoubleVector& x);
81  double evaluate_time_gradients(const CDoubleVector& x);
82  double evaluate_slice_gradient(CDoubleVector::const_iterator ii, std::vector<double>::iterator iout);
83 
84  std::vector<double> m_spacial_gradient;
85  std::vector<double> m_time_derivative;
86 
87  double m_a;
88  double m_b;
89  const C2DBounds& m_slice_size;
90  size_t m_nframes;
91  size_t m_frame_size;
92  const CDoubleVector& m_left_side;
94 };
95 
97 
98 #endif
A wrapper around the c-array to provide an STL like interface for iterators.
Definition: core/vector.hh:75
#define NS_MIA_BEGIN
conveniance define to start the mia namespace
Definition: defines.hh:33
#define EXPORT_2D
Definition: defines2d.hh:37
a class for the evaluation of a pseudo ground truth of a perfusion series
Base class for all optimization problems that can be run by CMinimizer.
Definition: minimizer.hh:80
#define NS_MIA_END
conveniance define to end the mia namespace
Definition: defines.hh:36