MEPP2 Project
contrastmasking.h
Go to the documentation of this file.
1 // Copyright (c) 2012-2019 University of Lyon and CNRS (France).
2 // All rights reserved.
3 //
4 // This file is part of MEPP2; you can redistribute it and/or modify
5 // it under the terms of the GNU Lesser General Public License as
6 // published by the Free Software Foundation; either version 3 of
7 // the License, or (at your option) any later version.
8 //
9 // This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
10 // WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
11 #pragma once
12 
13 #include <cmath>
14 
15 #include "genericparametricmodel.h"
16 
17 //-----------------------------------------------------------------------------------
18 
27 
29  : public GenericParametricModel< Eigen::Vector4d, double, double >
30 {
31 
32  //-----------------------------------------------------------------------------------
33 
34 public:
37  {
39  }
40 
43  {
44  }
45 
46  virtual ~DalyMasking() {}
47 
48  //-----------------------------------------------------------------------------------
49 
50 public:
51  virtual void compute(const InputType &in, OutputType &out) const
52  {
53  out =
54  pow(1. + pow(m_param(0) * pow(m_param(1) * in, m_param(2)), m_param(3)),
55  1. / m_param(3));
56  }
57 
58  //-----------------------------------------------------------------------------------
59 
60 protected:
64  virtual void default_params()
65  {
66  m_param = ParameterType(0.0078, 88.29, 1.0, 4.207);
67  }
68 };
genericparametricmodel.h
DalyMasking::compute
virtual void compute(const InputType &in, OutputType &out) const
Definition: contrastmasking.h:51
DalyMasking::~DalyMasking
virtual ~DalyMasking()
Definition: contrastmasking.h:46
GenericParametricModel< Eigen::Vector4d, double, double >::InputType
double InputType
Definition: genericparametricmodel.h:24
DalyMasking::DalyMasking
DalyMasking(const ParameterType &param)
Definition: contrastmasking.h:41
GenericParametricModel< Eigen::Vector4d, double, double >::ParameterType
Eigen::Vector4d ParameterType
Definition: genericparametricmodel.h:23
DalyMasking::DalyMasking
DalyMasking()
Definition: contrastmasking.h:35
GenericParametricModel< Eigen::Vector4d, double, double >::param
const ParameterType & param() const
Definition: genericparametricmodel.h:44
DalyMasking::default_params
virtual void default_params()
Definition: contrastmasking.h:64
GenericParametricModel< Eigen::Vector4d, double, double >::m_param
ParameterType m_param
Definition: genericparametricmodel.h:88
GenericParametricModel
Definition: genericparametricmodel.h:18
GenericParametricModel< Eigen::Vector4d, double, double >::OutputType
double OutputType
Definition: genericparametricmodel.h:25
DalyMasking
Definition: contrastmasking.h:30