ANIMA  4.0
animaTensorResampleImageFilter.h
Go to the documentation of this file.
1 #pragma once
2 
4 
5 namespace anima
6 {
7 
8 template <typename TImageType, typename TInterpolatorPrecisionType=double>
10  public OrientedModelBaseResampleImageFilter <TImageType,TInterpolatorPrecisionType>
11 {
12 public:
15 
17  typedef itk::SmartPointer<Self> Pointer;
18  typedef itk::SmartPointer<const Self> ConstPointer;
19 
22  itkStaticConstMacro(ImageDimension, unsigned int,InputImageType::ImageDimension);
23 
25  itkNewMacro(Self)
26 
27 
29 
30 protected:
32  {
33  m_VectorSize = ImageDimension * (ImageDimension + 1) / 2;
34  m_TensorDimension = ImageDimension;
35  }
36 
38 
39  virtual void BeforeThreadedGenerateData() ITK_OVERRIDE;
40  virtual void ReorientInterpolatedModel(const InputPixelType &interpolatedModel, vnl_matrix <double> &modelOrientationMatrix,
41  InputPixelType &rotatedModel, itk::ThreadIdType threadId) ITK_OVERRIDE;
42 
43 private:
44  ITK_DISALLOW_COPY_AND_ASSIGN(TensorResampleImageFilter);
45 
46  unsigned int m_VectorSize;
47  unsigned int m_TensorDimension;
48 
49  // Work variables
50  std::vector < vnl_matrix <double> > m_WorkMats;
51  std::vector < vnl_matrix <double> > m_TmpTensors;
52 
53  // Work vars for PPD
54  std::vector < vnl_vector_fixed <double, 3> > m_WorkEigenValues;
55  std::vector < itk::Matrix <double, 3, 3> > m_WorkEigenVectors;
56  std::vector < vnl_matrix <double> > m_WorkPPDOrientationMatrices;
57 };
58 
59 } // end namespace anima
60 
virtual void ReorientInterpolatedModel(const InputPixelType &interpolatedModel, vnl_matrix< double > &modelOrientationMatrix, InputPixelType &rotatedModel, itk::ThreadIdType threadId) ITK_OVERRIDE
Needs to be implemented in sub-classes, does the actual re-orientation of the model.
virtual void BeforeThreadedGenerateData() ITK_OVERRIDE
itk::SmartPointer< const Self > ConstPointer
OrientedModelBaseResampleImageFilter< TImageType, TInterpolatorPrecisionType > Superclass