ANIMA  4.0
animaDistortionCorrectionImageFilter.h
Go to the documentation of this file.
1 #pragma once
2 
3 #include <itkImage.h>
4 #include <itkImageToImageFilter.h>
5 #include <itkVectorContainer.h>
6 #include <itkVectorImage.h>
7 
8 namespace anima
9 {
10 
11 template< typename TInputImage >
13  public itk::ImageToImageFilter <TInputImage,itk::VectorImage< typename TInputImage::InternalPixelType,
14  TInputImage::ImageDimension > >
15 {
16 
17 public:
18  typedef itk::VectorImage< typename TInputImage::InternalPixelType, TInputImage::ImageDimension > OutputImageType;
19 
21  typedef itk::ImageToImageFilter<TInputImage, OutputImageType > Superclass;
22  typedef itk::SmartPointer<Self> Pointer;
23  typedef itk::SmartPointer<const Self> ConstPointer;
24  typedef itk::VectorImage <typename TInputImage::InternalPixelType, TInputImage::ImageDimension> TOutputImage;
25  typedef typename TOutputImage::RegionType OutputImageRegionType;
26  typedef typename TInputImage::DirectionType MatrixType;
27 
28  typedef typename TInputImage::InternalPixelType PixelType;
29  typedef typename TInputImage::ConstPointer InputImagePointer;
31  itkNewMacro(Self)
32 
33 
34  itkTypeMacro(DistortionCorrectionFilter, itk::ImageToImageFilter)
35 
36  itkSetMacro(Direction, unsigned int)
37  itkSetMacro(FieldSmoothingSigma, double)
38 
39 protected:
41 
43 
44  void GenerateOutputInformation() ITK_OVERRIDE;
45 
46  void GenerateData() ITK_OVERRIDE;
47  void BeforeThreadedGenerateData() ITK_OVERRIDE;
48  void DynamicThreadedGenerateData(const OutputImageRegionType& outputRegionForThread) ITK_OVERRIDE;
49  void AfterThreadedGenerateData() ITK_OVERRIDE;
50 
51 private:
52  ITK_DISALLOW_COPY_AND_ASSIGN(DistortionCorrectionImageFilter);
53 
54  unsigned int m_Direction;
55  double m_FieldSmoothingSigma;
56 
57  MatrixType m_ReferenceGeometry;
58 };
59 
60 } // end namespace anima
61 
itk::VectorImage< typename TInputImage::InternalPixelType, TInputImage::ImageDimension > TOutputImage
itk::VectorImage< typename TInputImage::InternalPixelType, TInputImage::ImageDimension > OutputImageType
void DynamicThreadedGenerateData(const OutputImageRegionType &outputRegionForThread) ITK_OVERRIDE
itk::ImageToImageFilter< TInputImage, OutputImageType > Superclass