13 #ifndef mitkConvertT2ConcentrationFunctor_h
14 #define mitkConvertT2ConcentrationFunctor_h
35 template <
class TInputPixel1,
class TInputPixel2,
class TOutputpixel>
56 return !(*
this == other);
61 return (this->m_k == other.m_k && this->m_TE == other.m_TE);
68 inline TOutputpixel
operator()(
const TInputPixel1 & value,
const TInputPixel2 & baseline)
70 double concentration = 0.0;
71 if(value !=0 && baseline != 0)
73 concentration = (-1.) * (this->m_k / this->m_TE) * log(
static_cast<double>(value) / baseline);
76 return static_cast<TOutputpixel
>(concentration);
#define MITKPHARMACOKINETICS_EXPORT
Binary functor that converts T2-weighted MR signal values to contrast agent concentration.
TOutputpixel operator()(const TInputPixel1 &value, const TInputPixel2 &baseline)
Computes concentration from signal and baseline pixel values.
bool operator!=(const ConvertT2ConcentrationFunctor &other) const
Inequality comparison operator.
ConvertT2ConcentrationFunctor()
void initialize(double factor, double TE)
Initializes the functor with the required MR sequence parameters.
~ConvertT2ConcentrationFunctor()
bool operator==(const ConvertT2ConcentrationFunctor &other) const
Equality comparison operator.
Find image slices visible on a given plane.