ANIMA  4.0
animaTensorCorrelationImageToImageMetric.h
Go to the documentation of this file.
1 #pragma once
2 
4 #include <itkVectorImage.h>
5 #include <itkCovariantVector.h>
6 #include <itkPoint.h>
7 
8 namespace anima
9 {
10 
17 template <class TFixedImagePixelType, class TMovingImagePixelType, unsigned int ImageDimension>
19 public BaseOrientedModelImageToImageMetric < itk::VectorImage <TFixedImagePixelType, ImageDimension>, itk::VectorImage <TMovingImagePixelType, ImageDimension> >
20 {
21 public:
22 
24  typedef itk::VectorImage <TFixedImagePixelType, ImageDimension> TFixedImage;
25  typedef itk::VectorImage <TMovingImagePixelType, ImageDimension> TMovingImage;
26 
29  typedef itk::SmartPointer<Self> Pointer;
30  typedef itk::SmartPointer<const Self> ConstPointer;
31 
33  itkNewMacro(Self)
34 
35 
37 
38 
39  typedef typename TFixedImage::PixelType PixelType;
40 
41  typedef typename Superclass::TransformType TransformType;
42  typedef typename Superclass::TransformPointer TransformPointer;
43  typedef typename Superclass::TransformParametersType TransformParametersType;
44  typedef typename Superclass::OutputPointType OutputPointType;
45  typedef typename Superclass::InputPointType InputPointType;
46  typedef typename itk::ContinuousIndex <double, ImageDimension> ContinuousIndexType;
47 
49 
50  typedef typename Superclass::MeasureType MeasureType;
51  typedef typename Superclass::FixedImageType FixedImageType;
52  typedef typename Superclass::MovingImageType MovingImageType;
53  typedef typename Superclass::FixedImageConstPointer FixedImageConstPointer;
54  typedef typename Superclass::MovingImageConstPointer MovingImageConstPointer;
55 
57  MeasureType GetValue(const TransformParametersType & parameters) const ITK_OVERRIDE;
58 
59  void PreComputeFixedValues();
60 
61 protected:
63  virtual ~TensorCorrelationImageToImageMetric() {}
64 
65 private:
66  TensorCorrelationImageToImageMetric(const Self&); //purposely not implemented
67  void operator=(const Self&); //purposely not implemented
68 
69  double m_FixedTProduct, m_FixedDenominator;
70  double m_LogEpsilon;
71 
72  std::vector <InputPointType> m_FixedImagePoints;
73  std::vector <PixelType> m_FixedImageValues;
74 };
75 
76 } // end namespace anima
77 
itk::ContinuousIndex< double, ImageDimension > ContinuousIndexType
itk::VectorImage< TFixedImagePixelType, ImageDimension > TFixedImage
Superclass::CoordinateRepresentationType CoordinateRepresentationType
Tensor correlation similarity measure as defined by Taquet et al.
BaseOrientedModelImageToImageMetric< TFixedImage, TMovingImage > Superclass
MeasureType GetValue(const TransformParametersType &parameters) const ITK_OVERRIDE
itk::VectorImage< TMovingImagePixelType, ImageDimension > TMovingImage