Medical Imaging Interaction Toolkit  2026.06.00
Medical Imaging Interaction Toolkit
mitkConvertToConcentrationTurboFlashFunctor.h
Go to the documentation of this file.
1 /*============================================================================
2 
3 The Medical Imaging Interaction Toolkit (MITK)
4 
5 Copyright (c) German Cancer Research Center (DKFZ)
6 All rights reserved.
7 
8 Use of this source code is governed by a 3-clause BSD license that can be
9 found in the LICENSE file.
10 
11 ============================================================================*/
12 
13 #ifndef mitkConvertToConcentrationTurboFlashFunctor_h
14 #define mitkConvertToConcentrationTurboFlashFunctor_h
15 
17 
18 namespace mitk {
19 
35  template <class TInputPixel1, class TInputPixel2, class TOutputpixel>
37  {
38 
39  private:
40  double m_Trec;
41  double m_alpha;
42  double m_T10;
43 
44  public:
45  ConvertToConcentrationTurboFlashFunctor() : m_Trec(0), m_alpha(0), m_T10(0) {};
47 
52  void initialize(double relaxationtime, double relaxivity, double recoverytime)
53  {
54  m_Trec = recoverytime;
55  m_alpha = relaxivity;
56  m_T10 = relaxationtime;
57  }
58 
61  {
62  return !(*this == other);
63  }
66  {
67  return (this->m_Trec == other.m_Trec) && (this->m_alpha == other.m_alpha) && (this->m_T10 == other.m_T10);
68  }
69 
76  inline TOutputpixel operator()( const TInputPixel1 & value, const TInputPixel2 & baseline)
77  {
78  TOutputpixel concentration(0);
79 
80 
81  //Only for TurboFLASH sequencen
82  if (baseline != 0 && ((double)value/baseline - exp(m_Trec/m_T10) * ((double)value/baseline - 1)) > 0 )
83  {
84  concentration = -1 / (m_Trec * m_alpha) * log((double)value/baseline - exp(m_Trec/m_T10) * ((double)value/baseline - 1));
85  }
86 
87 
88  return concentration;
89  }
90 
91 
92  };
93 
94 }
95 
96 #endif
#define MITKPHARMACOKINETICS_EXPORT
Binary functor that converts TurboFLASH MR signal values to contrast agent concentration.
void initialize(double relaxationtime, double relaxivity, double recoverytime)
Initializes the functor with TurboFLASH sequence parameters.
bool operator==(const ConvertToConcentrationTurboFlashFunctor &other) const
Equality comparison operator.
TOutputpixel operator()(const TInputPixel1 &value, const TInputPixel2 &baseline)
Computes concentration from signal and baseline pixel values.
bool operator!=(const ConvertToConcentrationTurboFlashFunctor &other) const
Inequality comparison operator.
Find image slices visible on a given plane.