ANIMA  4.0
animaT1RelaxometryEstimationImageFilter.h
Go to the documentation of this file.
1 #pragma once
2 
4 #include <itkVectorImage.h>
5 #include <itkImage.h>
6 
7 namespace anima
8 {
9 template <typename TInputImage, typename TOutputImage>
11 public anima::MaskedImageToImageFilter<TInputImage,TOutputImage>
12 {
13 public:
17  typedef itk::SmartPointer<Self> Pointer;
18  typedef itk::SmartPointer<const Self> ConstPointer;
19 
21  itkNewMacro(Self)
22 
23 
25 
26 
27  typedef TInputImage InputImageType;
28  typedef TOutputImage OutputImageType;
29  typedef typename InputImageType::Pointer InputImagePointer;
30  typedef typename OutputImageType::Pointer OutputImagePointer;
31 
33  typedef typename Superclass::MaskImageType MaskImageType;
34  typedef typename Superclass::InputImageRegionType InputImageRegionType;
35  typedef typename Superclass::OutputImageRegionType OutputImageRegionType;
36 
37  itkSetMacro(TRValue, double);
38  itkSetMacro(M0UpperBoundValue, double);
39  itkSetMacro(T1UpperBoundValue, double);
40  itkSetMacro(AverageSignalThreshold, double);
41  itkSetMacro(B1Map, OutputImagePointer);
42 
43  void SetFlipAngles(std::vector <double> &flipAngles) {m_FlipAngles = flipAngles;}
44 
45 protected:
47  : Superclass()
48  {
49  // There are 2 outputs: T1, M0
50  this->SetNumberOfRequiredOutputs(2);
51 
52  for (unsigned int i = 0;i < 2;++i)
53  this->SetNthOutput(i, this->MakeOutput(i));
54 
55  m_AverageSignalThreshold = 0;
56  m_B1Map = NULL;
57 
58  m_TRValue = 1;
59  m_T1UpperBoundValue = 5000;
60  m_M0UpperBoundValue = 5000;
61  }
62 
64 
65  void CheckComputationMask() ITK_OVERRIDE;
66 
67  void BeforeThreadedGenerateData() ITK_OVERRIDE;
68  void DynamicThreadedGenerateData(const OutputImageRegionType &outputRegionForThread) ITK_OVERRIDE;
69 
70 private:
71  ITK_DISALLOW_COPY_AND_ASSIGN(T1RelaxometryEstimationImageFilter);
72 
73  double m_AverageSignalThreshold;
74 
75  // If provided, corrects flip angles for B1, otherwise ignored
76  OutputImagePointer m_B1Map;
77 
78  // T1 relaxometry specific values
79  double m_TRValue;
80  std::vector <double> m_FlipAngles;
81 
82  double m_M0UpperBoundValue;
83  double m_T1UpperBoundValue;
84 };
85 
86 } // end namespace anima
87 
itk::Image< unsigned char, TInputImage::ImageDimension > MaskImageType
STL namespace.
void DynamicThreadedGenerateData(const OutputImageRegionType &outputRegionForThread) ITK_OVERRIDE
Superclass::InputImageRegionType InputImageRegionType
Superclass::OutputImageRegionType OutputImageRegionType
anima::MaskedImageToImageFilter< TInputImage, TOutputImage > Superclass