ANIMA  4.0
animaMCMBlockMatcher.h
Go to the documentation of this file.
1 #pragma once
3 
6 
7 namespace anima
8 {
9 
10 template <typename TInputImageType>
11 class MCMBlockMatcher : public anima::BaseAffineBlockMatcher <TInputImageType>
12 {
13 public:
15  virtual ~MCMBlockMatcher() {}
16 
18  {
22  MTCorrelation, // multi-tensor correlation from M. Taquet
24  };
25 
27  {
28  None = 0,
31  };
32 
35  typedef typename Superclass::PointType PointType;
40 
43 
45 
46  bool GetMaximizedMetric();
47  void SetSimilarityType(SimilarityDefinition val) {m_SimilarityType = val;}
48 
49  void SetModelRotationType(ModelRotationType val) {m_ModelRotationType = val;}
50 
51  void SetSmallDelta(double val) {m_SmallDelta = val;}
52  void SetBigDelta(double val) {m_BigDelta = val;}
53  void SetGradientStrengths(std::vector <double> &val) {m_GradientStrengths = val;}
54  void SetGradientDirections(std::vector <vnl_vector_fixed <double,3> > &grads) {m_GradientDirections = grads;}
55 
56 protected:
57  virtual MetricPointer SetupMetric();
58  virtual double ComputeBlockWeight(double val, unsigned int block);
59 
60  virtual void BlockMatchingSetup(MetricPointer &metric, unsigned int block);
61  virtual MCMInterpolatorType *CreateInterpolator();
62 
63  void InitializeBlocks();
64 
65 private:
66  SimilarityDefinition m_SimilarityType;
67  ModelRotationType m_ModelRotationType;
68 
69  double m_SmallDelta, m_BigDelta;
70  std::vector <double> m_GradientStrengths;
71  std::vector < vnl_vector_fixed <double,3> > m_GradientDirections;
72 };
73 
74 } // end namespace anima
75 
76 #include "animaMCMBlockMatcher.hxx"
virtual MetricPointer SetupMetric()
void SetGradientDirections(std::vector< vnl_vector_fixed< double, 3 > > &grads)
MCModelType::Pointer MCModelPointer
void SetBigDelta(double val)
Superclass::InputImageType InputImageType
Superclass::OptimizerPointer OptimizerPointer
void SetSmallDelta(double val)
Superclass::MetricPointer MetricPointer
anima::MultiCompartmentModel MCModelType
Superclass::BaseInputTransformPointer BaseInputTransformPointer
BaseInputTransformType::Pointer BaseInputTransformPointer
void SetGradientStrengths(std::vector< double > &val)
void SetSimilarityType(SimilarityDefinition val)
Superclass::MetricPointer MetricPointer
InputImageType::PointType PointType
virtual void BlockMatchingSetup(MetricPointer &metric, unsigned int block)
OptimizerType::Pointer OptimizerPointer
MultiCompartmentModel: holds several diffusion compartments, ordered by type It also handles weights ...
virtual double ComputeBlockWeight(double val, unsigned int block)
BaseAffineBlockMatcher< TInputImageType > Superclass
void SetModelRotationType(ModelRotationType val)
Superclass::AgregatorType AgregatorType
Superclass::PointType PointType
virtual MCMInterpolatorType * CreateInterpolator()
anima::MCMLinearInterpolateImageFunction< InputImageType, double > MCMInterpolatorType