ANIMA  4.0
animaT1SERelaxometryEstimationImageFilter.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  void SetTRValues (std::vector <double> &trValues) {m_TRValues = trValues;}
38 
39  itkSetMacro(M0UpperBound, double)
40  itkSetMacro(T1UpperBound, double)
41  itkSetMacro(AverageSignalThreshold, double)
42 
43  itkSetMacro(MaximumOptimizerIterations, unsigned int)
44  itkSetMacro(OptimizerStopCondition, double)
45  itkSetMacro(OptimizerInitialStep, double)
46 
47 protected:
49  : Superclass()
50  {
51  // There are 2 outputs: M0, T1
52  this->SetNumberOfRequiredOutputs(2);
53 
54  for (unsigned int i = 0;i < 2;++i)
55  this->SetNthOutput(i, this->MakeOutput(i));
56 
57  m_AverageSignalThreshold = 0;
58  m_TRValues.clear();
59 
60  m_M0UpperBound = 5000;
61  m_T1UpperBound = 5000;
62 
63  m_MaximumOptimizerIterations = 200;
64  m_OptimizerStopCondition = 1.0e-4;
65  m_OptimizerInitialStep = 10;
66  }
67 
69 
70  void CheckComputationMask() ITK_OVERRIDE;
71 
72  void DynamicThreadedGenerateData(const OutputImageRegionType &outputRegionForThread) ITK_OVERRIDE;
73 
74 private:
75  ITK_DISALLOW_COPY_AND_ASSIGN(T1SERelaxometryEstimationImageFilter);
76 
77  double m_AverageSignalThreshold;
78 
79  std::vector <double> m_TRValues;
80 
81  unsigned int m_MaximumOptimizerIterations;
82  double m_OptimizerStopCondition;
83  double m_OptimizerInitialStep;
84 
85  double m_M0UpperBound;
86  double m_T1UpperBound;
87 };
88 
89 } // end namespace anima
90 
void DynamicThreadedGenerateData(const OutputImageRegionType &outputRegionForThread) ITK_OVERRIDE
itk::Image< unsigned char, TInputImage::ImageDimension > MaskImageType
STL namespace.
Superclass::InputImageRegionType InputImageRegionType
Superclass::OutputImageRegionType OutputImageRegionType
anima::MaskedImageToImageFilter< TInputImage, TOutputImage > Superclass