ANIMA  4.0
animaBalooExternalExtrapolateImageFilter.h
Go to the documentation of this file.
1 #pragma once
2 
3 #include <iostream>
4 #include <itkInPlaceImageFilter.h>
5 #include <itkImage.h>
6 
7 namespace anima
8 {
9 
10 template <class TScalarType, unsigned int NDegreesOfFreedom, unsigned int NDimensions = 3>
12 public itk::InPlaceImageFilter < itk::Image < itk::Vector <TScalarType,NDegreesOfFreedom>, NDimensions > >
13 {
14 public:
17  typedef itk::Image <TScalarType, NDimensions> WeightImageType;
18  typedef typename WeightImageType::Pointer WeightImagePointer;
19  typedef itk::Image < itk::Vector <TScalarType,NDegreesOfFreedom>, NDimensions > TInputImage;
20  typedef itk::Image < itk::Vector <TScalarType,NDegreesOfFreedom>, NDimensions > TOutputImage;
21  typedef itk::InPlaceImageFilter <TInputImage, TOutputImage> Superclass;
22  typedef itk::SmartPointer <Self> Pointer;
23  typedef itk::SmartPointer <const Self> ConstPointer;
24 
26  itkNewMacro(Self)
27 
28 
29  itkTypeMacro(BalooExternalExtrapolateImageFilter, InPlaceImageFilter)
30 
31  typedef typename TOutputImage::PixelType OutputPixelType;
32  typedef typename TInputImage::PixelType InputPixelType;
33  typedef typename TInputImage::IndexType InputIndexType;
34  typedef typename TInputImage::PointType InputPointType;
35 
37  typedef typename TInputImage::Pointer InputImagePointer;
38  typedef typename TOutputImage::Pointer OutputImagePointer;
39 
41  typedef typename Superclass::OutputImageRegionType OutputImageRegionType;
42 
43  itkSetMacro(WeightImage, WeightImagePointer)
44  itkSetMacro(ExtrapolationSigma, double)
45 
46 protected:
48  {
49  this->SetInPlace(true);
50  m_ExtrapolationSigma = 3.0;
51  }
52 
54 
55  void BeforeThreadedGenerateData() ITK_OVERRIDE;
56  void DynamicThreadedGenerateData(const OutputImageRegionType &outputRegionForThread) ITK_OVERRIDE;
57 
58 private:
59  ITK_DISALLOW_COPY_AND_ASSIGN(BalooExternalExtrapolateImageFilter);
60  WeightImagePointer m_WeightImage, m_DistanceImage;
61  double m_ExtrapolationSigma;
62 };
63 
64 } // end namespace anima
65 
itk::InPlaceImageFilter< TInputImage, TOutputImage > Superclass
itk::Image< itk::Vector< TScalarType, NDegreesOfFreedom >, NDimensions > TInputImage
void DynamicThreadedGenerateData(const OutputImageRegionType &outputRegionForThread) ITK_OVERRIDE
itk::Image< itk::Vector< TScalarType, NDegreesOfFreedom >, NDimensions > TOutputImage