13 #ifndef mitkConvertT2ConcentrationFunctor_h
14 #define mitkConvertT2ConcentrationFunctor_h
20 template <
class TInputPixel1,
class TInputPixel2,
class TOutputpixel>
37 return !(*
this == other);
41 return (this->m_k == other.m_k && this->m_TE == other.m_TE);
44 inline TOutputpixel
operator()(
const TInputPixel1 & value,
const TInputPixel2 & baseline)
46 double concentration = 0.0;
47 if(value !=0 && baseline != 0)
49 concentration = (-1.) * (this->m_k / this->m_TE) * log(
static_cast<double>(value) / baseline);
52 return static_cast<TOutputpixel
>(concentration);