ANIMA  4.0
animaStimulatedSpinEchoImageFilter.h
Go to the documentation of this file.
1 #pragma once
2 
3 #include <itkImageToImageFilter.h>
4 #include <complex>
5 #include <vector>
6 
7 namespace anima
8 {
9 
10 template <class TImage, class TOutputImage>
11 class StimulatedSpinEchoImageFilter : public itk::ImageToImageFilter <TImage, TOutputImage>
12 {
13 public:
16  typedef itk::ImageToImageFilter <TImage, TOutputImage> Superclass;
17  typedef itk::SmartPointer <Self> Pointer;
18 
19  typedef itk::Image <typename TImage::PixelType, 4> Image4DType;
20  typedef typename Image4DType::Pointer Image4DPointer;
21  typedef TOutputImage OutputImageType;
22  typedef typename Superclass::OutputImageRegionType OutputImageRegionType;
23  typedef std::vector < std::complex <double> > ComplexVectorType;
24  typedef std::vector <ComplexVectorType> MatrixType;
25 
27  itkNewMacro(Self)
28 
29 
30  itkTypeMacro(StimulatedSpinEchoImageFilter, itk::ImageToImageFilter)
31 
32  itkSetMacro(EchoSpacing, double)
33  itkGetMacro(EchoSpacing, double)
34 
35  itkSetMacro(NumberOfEchoes, unsigned int)
36  itkGetMacro(NumberOfEchoes, unsigned int)
37 
38  itkSetMacro(FlipAngle, double)
39  itkGetMacro(FlipAngle, double)
40 
41  itkSetMacro(ExcitationFlipAngle, double)
42  itkGetMacro(ExcitationFlipAngle, double)
43 
44 
45  void SetInputT1(const TImage* T1);
46 
48  void SetInputT2(const TImage* T2);
49 
51  void SetInputM0(const TImage* M0);
52 
54  void SetInputB1(const TImage* B1);
55 
56  Image4DType *GetOutputAs4DImage();
57 
58 protected:
61 
63  virtual void DynamicThreadedGenerateData(const OutputImageRegionType &outputRegionForThread) ITK_OVERRIDE;
64 
65  void GenerateOutputInformation() ITK_OVERRIDE;
66 
67 private:
68  ITK_DISALLOW_COPY_AND_ASSIGN(StimulatedSpinEchoImageFilter);
69 
70  double m_EchoSpacing;
71  double m_ExcitationFlipAngle;
72  double m_FlipAngle;
73  unsigned int m_NumberOfEchoes;
74 
75  Image4DPointer m_Output4D;
76 };
77 
78 } // end of namespace anima
79 
itk::Image< typename TImage::PixelType, 4 > Image4DType
Superclass::OutputImageRegionType OutputImageRegionType
virtual void DynamicThreadedGenerateData(const OutputImageRegionType &outputRegionForThread) ITK_OVERRIDE
itk::ImageToImageFilter< TImage, TOutputImage > Superclass
std::vector< std::complex< double > > ComplexVectorType