Medical Imaging Interaction Toolkit  2023.04.00
Medical Imaging Interaction Toolkit
mitkConcentrationCurveGenerator.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 #ifndef mitkConcentrationCurveGenerator_h
13 #define mitkConcentrationCurveGenerator_h
14 
15 #include <mitkImage.h>
16 #include <itkBinaryFunctorImageFilter.h>
19 
21 
22 namespace mitk {
23 
32 {
33 public:
34 
36  itkNewMacro(Self);
37 
38  //typedef itk::Image<double,3> ImageType;
39  typedef itk::Image<double,3> ConvertedImageType;
40 
41 
43  itkSetConstObjectMacro(DynamicImage,Image);
44  itkGetConstObjectMacro(DynamicImage,Image);
45 
47  itkSetMacro(RelaxationTime, double);
48  itkGetConstReferenceMacro(RelaxationTime, double);
49 
50  itkSetMacro(Relaxivity, double);
51  itkGetConstReferenceMacro(Relaxivity, double);
52 
53  itkSetMacro(RecoveryTime, double);
54  itkGetConstReferenceMacro(RecoveryTime, double);
55 
56  itkSetMacro(FlipAngle, double);
57  itkGetConstReferenceMacro(FlipAngle, double);
58 
59  itkSetMacro(Factor, double);
60  itkGetConstReferenceMacro(Factor, double);
61 
63  itkSetConstObjectMacro(T10Image,Image);
64  itkGetConstObjectMacro(T10Image,Image);
65 
66  itkSetMacro(T2Factor, double);
67  itkGetConstReferenceMacro(T2Factor, double);
68 
69  itkSetMacro(T2EchoTime, double);
70  itkGetConstReferenceMacro(T2EchoTime, double);
71 
72 
75  itkSetMacro(BaselineStartTimeStep, unsigned int);
76  itkGetConstReferenceMacro(BaselineStartTimeStep, unsigned int);
77 
78  itkSetMacro(BaselineEndTimeStep, unsigned int);
79  itkGetConstReferenceMacro(BaselineEndTimeStep, unsigned int);
80 
81  itkSetMacro(isTurboFlashSequence,bool);
82  itkGetConstReferenceMacro(isTurboFlashSequence,bool);
83 
84  itkSetMacro(AbsoluteSignalEnhancement,bool);
85  itkGetConstReferenceMacro(AbsoluteSignalEnhancement,bool);
86 
87  itkSetMacro(RelativeSignalEnhancement,bool);
88  itkGetConstReferenceMacro(RelativeSignalEnhancement,bool);
89 
90  itkSetMacro(UsingT1Map,bool);
91  itkGetConstReferenceMacro(UsingT1Map,bool);
92 
93 
94  itkSetMacro(isT2weightedImage,bool);
95  itkGetConstReferenceMacro(isT2weightedImage,bool);
96 
97  Image::Pointer GetConvertedImage();
98 
99 protected:
100 
102  ~ConcentrationCurveGenerator() override;
103 
104 
105  template<class TPixel_input, class TPixel_baseline>
106  mitk::Image::Pointer convertToConcentration(const itk::Image<TPixel_input, 3> *itkInputImage, const itk::Image<TPixel_baseline, 3> *itkBaselineImage);
107 
109  mitk::Image::Pointer ConvertSignalToConcentrationCurve(const mitk::Image* inputImage, const mitk::Image* baselineImage);
110 
111 
112 
114  void PrepareBaselineImage();
115 
116  template<class TPixel>
117  void CalculateAverageBaselineImage(const itk::Image<TPixel,4> *itkBaselineImage);
118 
120  virtual void Convert();
121 
122 
123 private:
124  Image::ConstPointer m_DynamicImage;
125  Image::ConstPointer m_BaselineImage;
126  Image::ConstPointer m_T10Image;
127  Image::Pointer m_ConvertSignalToConcentrationCurve_OutputImage;
128  Image::Pointer m_ConvertedImage;
129 
130  bool m_isT2weightedImage;
131 
132  bool m_isTurboFlashSequence;
133  bool m_AbsoluteSignalEnhancement;
134  bool m_RelativeSignalEnhancement;
135  bool m_UsingT1Map;
136 
137  double m_Factor;
138  //=Repetition Time TR
139  double m_RecoveryTime;
140  //= pre-CA T1 time
141  double m_RelaxationTime;
142  //= contrast agent relaxivity
143  double m_Relaxivity;
144 
145  double m_FlipAngle;
146 
147  double m_T2Factor;
148  double m_T2EchoTime;
149  // The baseline image is averaged from the signal within time step range [m_BaselineStartTimeStep, m_BaselineEndTimeStep].
150  // m_BaselineStartTimeStep is the first time frame, that is included into the baseline averaging (starting with 0).
151  unsigned int m_BaselineStartTimeStep;
152  // m_BaselinStopTimeStep is the last time frame, that is included into the baseline averaging.
153  unsigned int m_BaselineEndTimeStep;
154 };
155 
156 }
157 #endif
MITKPHARMACOKINETICS_EXPORT
#define MITKPHARMACOKINETICS_EXPORT
Definition: MitkPharmacokineticsExports.h:15
mitkImage.h
mitk::Image
Image class for storing images.
Definition: mitkImage.h:69
itk::SmartPointer< Self >
MitkPharmacokineticsExports.h
mitkClassMacroItkParent
#define mitkClassMacroItkParent(className, SuperClassName)
Definition: mitkCommon.h:45
mitk
DataCollection - Class to facilitate loading/accessing structured data.
Definition: RenderingTests.dox:1
mitk::ConcentrationCurveGenerator::ConvertedImageType
itk::Image< double, 3 > ConvertedImageType
Definition: mitkConcentrationCurveGenerator.h:36
mitk::ConcentrationCurveGenerator
Converts a given 4D mitk::Image with MR signal values into a 4D mitk::Image with corresponding contra...
Definition: mitkConcentrationCurveGenerator.h:31
mitkConvertToConcentrationAbsoluteFunctor.h
mitkConvertToConcentrationRelativeFunctor.h