ANIMA  4.0
animaDistortionCorrectionBlockMatcher.h
Go to the documentation of this file.
1 #pragma once
3 
4 namespace anima
5 {
6 
7 template <typename TInputImageType>
9 {
10 public:
13 
15  {
19  };
20 
22  {
23  Direction = 0,
26  };
27 
30  typedef typename Superclass::PointType PointType;
35 
37  void SetBlockTransformType(TransformDefinition val) {m_BlockTransformType = val;}
38  TransformDefinition &GetBlockTransformType() {return m_BlockTransformType;}
39 
40  void SetSearchSkewRadius(double val) {m_SearchSkewRadius = val;}
41  void SetSearchScaleRadius(double val) {m_SearchScaleRadius = val;}
42 
43  void SetTranslateMax(double val) {m_TranslateMax = val;}
44  void SetSkewMax(double val) {m_SkewMax = val;}
45  void SetScaleMax(double val) {m_ScaleMax = val;}
46 
47  void SetTransformDirection(unsigned int val) {m_TransformDirection = val;}
48 
49  bool GetMaximizedMetric();
50  void SetSimilarityType(SimilarityDefinition val) {m_SimilarityType = val;}
51 
52 protected:
53  virtual BaseInputTransformPointer GetNewBlockTransform(PointType &blockCenter);
54 
55  virtual MetricPointer SetupMetric();
56  virtual double ComputeBlockWeight(double val, unsigned int block);
57 
58  virtual void BlockMatchingSetup(MetricPointer &metric, unsigned int block);
59  virtual void TransformDependantOptimizerSetup(OptimizerPointer &optimizer);
60 
61 private:
62  SimilarityDefinition m_SimilarityType;
63  TransformDefinition m_BlockTransformType;
64 
65  // Bobyqa radiuses
66  double m_SearchSkewRadius;
67  double m_SearchScaleRadius;
68 
69  //Bobyqa bounds parameters
70  double m_TranslateMax;
71  double m_SkewMax;
72  double m_ScaleMax;
73 
74  unsigned int m_TransformDirection;
75 };
76 
77 } // end namespace anima
78 
MetricType::Pointer MetricPointer
Superclass::BaseInputTransformPointer BaseInputTransformPointer
virtual void BlockMatchingSetup(MetricPointer &metric, unsigned int block)
BaseInputTransformType::Pointer BaseInputTransformPointer
virtual void TransformDependantOptimizerSetup(OptimizerPointer &optimizer)
InputImageType::PointType PointType
OptimizerType::Pointer OptimizerPointer
virtual BaseInputTransformPointer GetNewBlockTransform(PointType &blockCenter)
virtual double ComputeBlockWeight(double val, unsigned int block)