Medical Imaging Interaction Toolkit  2026.06.00
Medical Imaging Interaction Toolkit
mitkConvertToConcentrationRelativeFunctor.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 mitkConvertToConcentrationRelativeFunctor_h
14 #define mitkConvertToConcentrationRelativeFunctor_h
15 
17 
18 namespace mitk {
19 
36  template <class TInputPixel1, class TInputPixel2, class TOutputpixel>
38  {
39 
40  public:
43 
46  void initialize(double factor)
47  {
48 
49  m_k = factor;
50  }
51 
54  {
55  return !(*this == other);
56  }
59  {
60  return (this->m_k == other.m_k);
61  }
62 
67  inline TOutputpixel operator()( const TInputPixel1 & value, const TInputPixel2 & baseline)
68  {
69  TOutputpixel concentration(0);
70 
71  if(baseline != 0)
72  {
73  concentration = this->m_k * (double)(value- baseline)/baseline ;
74  }
75 
76  return concentration;
77  }
78 
79  private:
80  double m_k;
81 
82  };
83 
84 }
85 #endif
#define MITKPHARMACOKINETICS_EXPORT
Binary functor that converts MR signal to concentration using relative signal enhancement.
void initialize(double factor)
Initializes the functor with the scaling factor.
bool operator==(const ConvertToConcentrationRelativeFunctor &other) const
Equality comparison operator.
bool operator!=(const ConvertToConcentrationRelativeFunctor &other) const
Inequality comparison operator.
TOutputpixel operator()(const TInputPixel1 &value, const TInputPixel2 &baseline)
Computes concentration from signal and baseline pixel values.
Find image slices visible on a given plane.