Medical Imaging Interaction Toolkit  2024.06.99-60d9b802
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(RepetitionTime, double);
57  itkGetConstReferenceMacro(RepetitionTime, double);
58 
59  itkSetMacro(FlipAngle, double);
60  itkGetConstReferenceMacro(FlipAngle, double);
61 
62  itkSetMacro(FlipAnglePDW, double);
63  itkGetConstReferenceMacro(FlipAnglePDW, double);
64 
65  itkSetMacro(Factor, double);
66  itkGetConstReferenceMacro(Factor, double);
67 
69  itkSetConstObjectMacro(PDWImage,Image);
70  itkGetConstObjectMacro(PDWImage,Image);
71 
72  itkSetMacro(T2Factor, double);
73  itkGetConstReferenceMacro(T2Factor, double);
74 
75  itkSetMacro(T2EchoTime, double);
76  itkGetConstReferenceMacro(T2EchoTime, double);
77 
78 
81  itkSetMacro(BaselineStartTimeStep, unsigned int);
82  itkGetConstReferenceMacro(BaselineStartTimeStep, unsigned int);
83 
84  itkSetMacro(BaselineEndTimeStep, unsigned int);
85  itkGetConstReferenceMacro(BaselineEndTimeStep, unsigned int);
86 
87  itkSetMacro(isTurboFlashSequence,bool);
88  itkGetConstReferenceMacro(isTurboFlashSequence,bool);
89 
90  itkSetMacro(AbsoluteSignalEnhancement,bool);
91  itkGetConstReferenceMacro(AbsoluteSignalEnhancement,bool);
92 
93  itkSetMacro(RelativeSignalEnhancement,bool);
94  itkGetConstReferenceMacro(RelativeSignalEnhancement,bool);
95 
96  itkSetMacro(UsingT1Map,bool);
97  itkGetConstReferenceMacro(UsingT1Map,bool);
98 
99 
100  itkSetMacro(isT2weightedImage,bool);
101  itkGetConstReferenceMacro(isT2weightedImage,bool);
102 
103  Image::Pointer GetConvertedImage();
104 
105 protected:
106 
108  ~ConcentrationCurveGenerator() override;
109 
110 
111  template<class TPixel_input, class TPixel_baseline>
112  mitk::Image::Pointer convertToConcentration(const itk::Image<TPixel_input, 3> *itkInputImage, const itk::Image<TPixel_baseline, 3> *itkBaselineImage);
113 
115  mitk::Image::Pointer ConvertSignalToConcentrationCurve(const mitk::Image* inputImage, const mitk::Image* baselineImage);
116 
117 
118 
120  void PrepareBaselineImage();
121 
122  template<class TPixel>
123  void CalculateAverageBaselineImage(const itk::Image<TPixel,4> *itkBaselineImage);
124 
126  virtual void Convert();
127 
128 
129 private:
130  Image::ConstPointer m_DynamicImage;
131  Image::ConstPointer m_BaselineImage;
132  Image::ConstPointer m_PDWImage;
133  Image::Pointer m_ConvertSignalToConcentrationCurve_OutputImage;
134  Image::Pointer m_ConvertedImage;
135 
136  bool m_isT2weightedImage;
137 
138  bool m_isTurboFlashSequence;
139  bool m_AbsoluteSignalEnhancement;
140  bool m_RelativeSignalEnhancement;
141  bool m_UsingT1Map;
142 
143  double m_Factor;
144  //=Recovery Time
145  double m_RecoveryTime;
146  //=Repetition Time TR
147  double m_RepetitionTime;
148  //= pre-CA T1 time
149  double m_RelaxationTime;
150  //= contrast agent relaxivity
151  double m_Relaxivity;
152 
153  double m_FlipAngle;
154 
155  double m_FlipAnglePDW;
156 
157  double m_T2Factor;
158  double m_T2EchoTime;
159  // The baseline image is averaged from the signal within time step range [m_BaselineStartTimeStep, m_BaselineEndTimeStep].
160  // m_BaselineStartTimeStep is the first time frame, that is included into the baseline averaging (starting with 0).
161  unsigned int m_BaselineStartTimeStep;
162  // m_BaselinStopTimeStep is the last time frame, that is included into the baseline averaging.
163  unsigned int m_BaselineEndTimeStep;
164 };
165 
166 }
167 #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
Find image slices visible on a given plane.
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