groundtruthproblem.hh
Go to the documentation of this file.
/* -*- mia-c++ -*-
*
* This file is part of MIA - a toolbox for medical image analysis
* Copyright (c) Leipzig, Madrid 1999-2017 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_ground_truth_problem_hh
#define mia_2d_ground_truth_problem_hh
#include <mia/core/minimizer.hh>
#include <mia/2d/correlation_weight.hh>
NS_MIA_BEGIN
class EXPORT_2D GroundTruthProblem : public CMinimizer::Problem
{
public:
GroundTruthProblem(double a, double b,
const C2DBounds& slice_size,
size_t nframes,
const CDoubleVector& left_side,
const CCorrelationEvaluator::result_type& corr);
void set_alpha_beta(double a, double b);
protected:
const std::vector<double>& get_spacial_gradient() const;
const std::vector<double>& get_time_derivative() const;
private:
virtual double do_f(const CDoubleVector& x);
virtual void do_df(const CDoubleVector& x, CDoubleVector& g);
virtual double do_fdf(const CDoubleVector& x, CDoubleVector& g);
size_t do_size() const;
double evaluate_spacial_gradients(const CDoubleVector& x);
double evaluate_time_gradients(const CDoubleVector& x);
double evaluate_slice_gradient(CDoubleVector::const_iterator ii, std::vector<double>::iterator iout);
std::vector<double> m_spacial_gradient;
std::vector<double> m_time_derivative;
double m_a;
double m_b;
const C2DBounds& m_slice_size;
size_t m_nframes;
size_t m_frame_size;
const CDoubleVector& m_left_side;
const CCorrelationEvaluator::result_type& m_corr;
};
NS_MIA_END
#endif
C2DBounds
T2DVector< unsigned int > C2DBounds
unsigned int valued 2D vector - used as 2D size parameter
Definition 2d/vector.hh:540
CMinimizer::Problem
Base class for all optimization problems that can be run by CMinimizer.
Definition minimizer.hh:82
GroundTruthProblem::get_time_derivative
const std::vector< double > & get_time_derivative() const
GroundTruthProblem::set_alpha_beta
void set_alpha_beta(double a, double b)
GroundTruthProblem::GroundTruthProblem
GroundTruthProblem(double a, double b, const C2DBounds &slice_size, size_t nframes, const CDoubleVector &left_side, const CCorrelationEvaluator::result_type &corr)
GroundTruthProblem::get_spacial_gradient
const std::vector< double > & get_spacial_gradient() const
correlation_weight.hh
EXPORT_2D
#define EXPORT_2D
Definition defines2d.hh:37
NS_MIA_BEGIN
#define NS_MIA_BEGIN
conveniance define to start the mia namespace
Definition defines.hh:33
NS_MIA_END
#define NS_MIA_END
conveniance define to end the mia namespace
Definition defines.hh:36
CDoubleVector
TCArrayWrapper< double > CDoubleVector
Definition core/vector.hh:266
minimizer.hh
CCorrelationEvaluator::result_type
Definition correlation_weight.hh:45