ANIMA  4.0
animaSVFExponentialImageFilter.h
Go to the documentation of this file.
1 #pragma once
2 
3 #include <itkImageToImageFilter.h>
4 
5 namespace anima
6 {
7 
18 template <typename TPixelType, unsigned int Dimension>
20 public itk::ImageToImageFilter< itk::Image <itk::Vector <TPixelType, Dimension>, Dimension> ,
21  itk::Image <itk::Vector <TPixelType, Dimension>, Dimension> >
22 {
23 public:
25  typedef typename itk::Image <itk::Vector <TPixelType, Dimension>, Dimension> InputImageType;
26  typedef typename itk::Image <itk::Vector <TPixelType, Dimension * Dimension>, Dimension> JacobianImageType;
27  typedef typename itk::Image <itk::Vector <TPixelType, Dimension>, Dimension> OutputImageType;
28  typedef itk::ImageToImageFilter <InputImageType, OutputImageType> Superclass;
29  typedef itk::SmartPointer<Self> Pointer;
30  typedef itk::SmartPointer<const Self> ConstPointer;
31 
32  itkNewMacro(Self)
33 
34  itkTypeMacro(SVFExponentialImageFilter, itk::ImageToImageFilter)
35 
36  typedef typename InputImageType::PixelType InputPixelType;
37  typedef typename OutputImageType::PixelType OutputPixelType;
38  typedef typename JacobianImageType::Pointer JacobianImagePointer;
39  typedef typename JacobianImageType::PixelType JacobianPixelType;
40 
41  typedef typename Superclass::OutputImageRegionType OutputImageRegionType;
42 
43  itkSetMacro(ExponentiationOrder, unsigned int)
44  itkSetMacro(MaximalDisplacementAmplitude, double)
45 
46 protected:
48  {
49  m_ExponentiationOrder = 0;
50  m_MaximalDisplacementAmplitude = 0.25;
51  m_FieldJacobian = 0;
52  }
53 
55 
56  void BeforeThreadedGenerateData() ITK_OVERRIDE;
57  void DynamicThreadedGenerateData(const OutputImageRegionType &outputRegionForThread) ITK_OVERRIDE;
58  void AfterThreadedGenerateData() ITK_OVERRIDE;
59 
60 private:
61  ITK_DISALLOW_COPY_AND_ASSIGN(SVFExponentialImageFilter);
62 
64  double m_MaximalDisplacementAmplitude;
65 
67  double m_ExponentiationOrder;
68 
70  JacobianImagePointer m_FieldJacobian;
71 
73  unsigned int m_NumberOfSquarings;
74 };
75 
76 } // end namespace anima
77 
itk::Image< itk::Vector< TPixelType, Dimension >, Dimension > OutputImageType
itk::Image< itk::Vector< TPixelType, Dimension *Dimension >, Dimension > JacobianImageType
itk::ImageToImageFilter< InputImageType, OutputImageType > Superclass
Computes the exponentiation of a stationary velocity field using sclaing and squaring and approximate...
itk::Image< itk::Vector< TPixelType, Dimension >, Dimension > InputImageType
JacobianImageType::PixelType JacobianPixelType
Superclass::OutputImageRegionType OutputImageRegionType
itk::SmartPointer< const Self > ConstPointer
void DynamicThreadedGenerateData(const OutputImageRegionType &outputRegionForThread) ITK_OVERRIDE