NifTK  16.4.1 - 0798f20
CMIC's Translational Medical Imaging Platform
itkLeastTrimmedSquaresPointMetric.h
Go to the documentation of this file.
1 /*=============================================================================
2 
3  NifTK: A software platform for medical image computing.
4 
5  Copyright (c) University College London (UCL). All rights reserved.
6 
7  This software is distributed WITHOUT ANY WARRANTY; without even
8  the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
9  PURPOSE.
10 
11  See LICENSE.txt in the top level directory for details.
12 
13 =============================================================================*/
14 
15 #ifndef itkLeastTrimmedSquaresPointMetric_h
16 #define itkLeastTrimmedSquaresPointMetric_h
17 
19 #include <itkCovariantVector.h>
20 #include <itkPoint.h>
21 #include <itkPointSet.h>
22 #include <itkImage.h>
23 
24 namespace itk
25 {
38 template < class TFixedPointSet, class TMovingPointSet>
39 class ITK_EXPORT LeastTrimmedSquaresPointMetric :
40  public PointSetToPointSetSingleValuedMetric< TFixedPointSet, TMovingPointSet>
41 {
42 public:
43 
47  typedef SmartPointer<Self> Pointer;
48  typedef SmartPointer<const Self> ConstPointer;
49 
51  itkNewMacro(Self);
52 
55 
61 
68 
71 
73  unsigned int GetNumberOfValues() const;
74 
76  void GetDerivative( const TransformParametersType & parameters, DerivativeType & Derivative ) const;
77 
79  MeasureType GetValue( const TransformParametersType & parameters ) const;
80 
82  void GetValueAndDerivative( const TransformParametersType & parameters, MeasureType& Value, DerivativeType& Derivative ) const;
83 
85  itkSetMacro(PercentageOfPointsToKeep, int);
86  itkGetMacro(PercentageOfPointsToKeep, int);
87 
88 protected:
91 
93  void PrintSelf(std::ostream& os, Indent indent) const;
94 
95 private:
96  LeastTrimmedSquaresPointMetric(const Self&); //purposely not implemented
97  void operator=(const Self&); //purposely not implemented
98 
99  int m_PercentageOfPointsToKeep;
100 };
101 
102 } // end namespace itk
103 
104 #ifndef ITK_MANUAL_INSTANTIATION
105 #include "itkLeastTrimmedSquaresPointMetric.txx"
106 #endif
107 
108 #endif
Like sum of squared difference between point sets, except you throw away a certain percentage of outl...
Definition: itkLeastTrimmedSquaresPointMetric.h:39
Superclass::MeasureType MeasureType
Definition: itkPointSetToPointSetSingleValuedMetric.h:89
TMovingPointSet MovingPointSetType
Definition: itkPointSetToPointSetSingleValuedMetric.h:56
Superclass::FixedPointSetConstPointer FixedPointSetConstPointer
Definition: itkLeastTrimmedSquaresPointMetric.h:66
SmartPointer< const Self > ConstPointer
Definition: itkLeastTrimmedSquaresPointMetric.h:48
PointSetToPointSetSingleValuedMetric< TFixedPointSet, TMovingPointSet > Superclass
Definition: itkLeastTrimmedSquaresPointMetric.h:46
Superclass::TransformPointer TransformPointer
Definition: itkLeastTrimmedSquaresPointMetric.h:58
FixedPointSetType::PointsContainer::ConstIterator PointIterator
Definition: itkPointSetToPointSetSingleValuedMetric.h:74
Definition: niftkITKAffineResampleImage.cxx:74
Superclass::DerivativeType DerivativeType
Definition: itkPointSetToPointSetSingleValuedMetric.h:92
TransformType::Pointer TransformPointer
Definition: itkPointSetToPointSetSingleValuedMetric.h:82
Superclass::MeasureType MeasureType
Definition: itkLeastTrimmedSquaresPointMetric.h:62
FixedPointSetType::ConstPointer FixedPointSetConstPointer
Definition: itkPointSetToPointSetSingleValuedMetric.h:66
Superclass::DerivativeType DerivativeType
Definition: itkLeastTrimmedSquaresPointMetric.h:63
Superclass::TransformJacobianType TransformJacobianType
Definition: itkLeastTrimmedSquaresPointMetric.h:60
SmartPointer< Self > Pointer
Definition: itkLeastTrimmedSquaresPointMetric.h:47
TransformType::ParametersType TransformParametersType
Definition: itkPointSetToPointSetSingleValuedMetric.h:85
LeastTrimmedSquaresPointMetric Self
Definition: itkLeastTrimmedSquaresPointMetric.h:45
Superclass::TransformParametersType TransformParametersType
Definition: itkLeastTrimmedSquaresPointMetric.h:59
Superclass::MovingPointSetConstPointer MovingPointSetConstPointer
Definition: itkLeastTrimmedSquaresPointMetric.h:67
FixedPointSetType::PointDataContainer::ConstIterator PointDataIterator
Definition: itkPointSetToPointSetSingleValuedMetric.h:75
Superclass::FixedPointSetType FixedPointSetType
Definition: itkLeastTrimmedSquaresPointMetric.h:64
Computes similarity between two point sets, but sums it up to a single value.
Definition: itkPointSetToPointSetSingleValuedMetric.h:42
Superclass::MovingPointSetType MovingPointSetType
Definition: itkLeastTrimmedSquaresPointMetric.h:65
Superclass::PointDataIterator PointDataIterator
Definition: itkLeastTrimmedSquaresPointMetric.h:70
TFixedPointSet FixedPointSetType
Definition: itkPointSetToPointSetSingleValuedMetric.h:64
MovingPointSetType::ConstPointer MovingPointSetConstPointer
Definition: itkPointSetToPointSetSingleValuedMetric.h:61
Transform< CoordinateRepresentationType, itkGetStaticConstMacro(MovingPointSetDimension), itkGetStaticConstMacro(FixedPointSetDimension)> TransformType
Definition: itkPointSetToPointSetSingleValuedMetric.h:80
virtual ~LeastTrimmedSquaresPointMetric()
Definition: itkLeastTrimmedSquaresPointMetric.h:90
TransformType::JacobianType TransformJacobianType
Definition: itkPointSetToPointSetSingleValuedMetric.h:86
Superclass::PointIterator PointIterator
Definition: itkLeastTrimmedSquaresPointMetric.h:69
Superclass::TransformType TransformType
Definition: itkLeastTrimmedSquaresPointMetric.h:54