ANIMA  4.0
animaLocalPatchMeanDistanceImageFilter.h
Go to the documentation of this file.
1 #pragma once
2 
3 #include <iostream>
5 #include <itkVectorImage.h>
6 #include <itkImage.h>
7 
8 #include <vector>
9 
10 namespace anima
11 {
12 
13 template <class PixelScalarType>
15 public anima::MaskedImageToImageFilter< itk::VectorImage <PixelScalarType, 3> , itk::Image <PixelScalarType, 3> >
16 {
17 public:
20  typedef itk::SmartPointer<Self> Pointer;
21  typedef itk::SmartPointer<const Self> ConstPointer;
22 
24  itkNewMacro(Self)
25 
26 
28 
29 
30  typedef itk::VectorImage <PixelScalarType, 3> InputImageType;
31  typedef itk::Image <PixelScalarType, 3> OutputImageType;
32 
33  typedef typename InputImageType::PixelType VectorType;
34 
35  typedef vnl_matrix <double> CovarianceType;
36 
37  typedef typename InputImageType::Pointer InputImagePointer;
38  typedef typename InputImageType::IndexType InputImageIndexType;
39  typedef typename OutputImageType::Pointer OutputImagePointer;
40 
42  typedef anima::MaskedImageToImageFilter< InputImageType, OutputImageType > Superclass;
43  typedef typename Superclass::MaskImageType MaskImageType;
44  typedef typename Superclass::OutputImageRegionType OutputImageRegionType;
45 
46  itkSetMacro(PatchHalfSize, unsigned int)
47 
48 protected:
50  : Superclass()
51  {
52  this->SetNumberOfRequiredOutputs(2);
53  this->SetNthOutput(0,this->MakeOutput(0));
54  this->SetNthOutput(1,this->MakeOutput(1));
55 
56  m_PatchHalfSize = 1;
57  }
58 
60 
61  void BeforeThreadedGenerateData() ITK_OVERRIDE;
62  void DynamicThreadedGenerateData(const OutputImageRegionType &outputRegionForThread) ITK_OVERRIDE;
63 
64 private:
65  ITK_DISALLOW_COPY_AND_ASSIGN(LocalPatchMeanDistanceImageFilter);
66 
67  unsigned int m_PatchHalfSize;
68 };
69 
70 } // end namespace anima
71 
LocalPatchMeanDistanceImageFilter< PixelScalarType > Self
void DynamicThreadedGenerateData(const OutputImageRegionType &outputRegionForThread) ITK_OVERRIDE