00001 /*========================================================================= 00002 00003 Program: Insight Segmentation & Registration Toolkit 00004 Module: $RCSfile: itkMeanSquaresPointSetToImageMetric.h,v $ 00005 Language: C++ 00006 Date: $Date: 2008-02-03 04:05:29 $ 00007 Version: $Revision: 1.21 $ 00008 00009 Copyright (c) Insight Software Consortium. All rights reserved. 00010 See ITKCopyright.txt or http://www.itk.org/HTML/Copyright.htm for details. 00011 00012 This software is distributed WITHOUT ANY WARRANTY; without even 00013 the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 00014 PURPOSE. See the above copyright notices for more information. 00015 00016 =========================================================================*/ 00017 #ifndef __itkMeanSquaresPointSetToImageMetric_h 00018 #define __itkMeanSquaresPointSetToImageMetric_h 00019 00020 #include "itkPointSetToImageMetric.h" 00021 #include "itkCovariantVector.h" 00022 #include "itkPoint.h" 00023 00024 00025 namespace itk 00026 { 00027 00040 template < class TFixedPointSet, class TMovingImage > 00041 class ITK_EXPORT MeanSquaresPointSetToImageMetric : 00042 public PointSetToImageMetric< TFixedPointSet, TMovingImage> 00043 { 00044 public: 00045 00047 typedef MeanSquaresPointSetToImageMetric Self; 00048 typedef PointSetToImageMetric<TFixedPointSet, TMovingImage > Superclass; 00049 00050 typedef SmartPointer<Self> Pointer; 00051 typedef SmartPointer<const Self> ConstPointer; 00052 00054 itkNewMacro(Self); 00055 00057 itkTypeMacro(MeanSquaresPointSetToImageMetric, Object); 00058 00059 00061 typedef typename Superclass::RealType RealType; 00062 typedef typename Superclass::TransformType TransformType; 00063 typedef typename Superclass::TransformPointer TransformPointer; 00064 typedef typename Superclass::TransformParametersType TransformParametersType; 00065 typedef typename Superclass::TransformJacobianType TransformJacobianType; 00066 typedef typename Superclass::GradientPixelType GradientPixelType; 00067 typedef typename Superclass::InputPointType InputPointType; 00068 typedef typename Superclass::OutputPointType OutputPointType; 00069 00070 typedef typename Superclass::MeasureType MeasureType; 00071 typedef typename Superclass::DerivativeType DerivativeType; 00072 typedef typename Superclass::FixedPointSetType FixedPointSetType; 00073 typedef typename Superclass::MovingImageType MovingImageType; 00074 typedef typename Superclass::FixedPointSetConstPointer FixedPointSetConstPointer; 00075 typedef typename Superclass::MovingImageConstPointer MovingImageConstPointer; 00076 00077 typedef typename Superclass::PointIterator PointIterator; 00078 typedef typename Superclass::PointDataIterator PointDataIterator; 00079 00080 00082 void GetDerivative( const TransformParametersType & parameters, 00083 DerivativeType & Derivative ) const; 00084 00086 MeasureType GetValue( const TransformParametersType & parameters ) const; 00087 00089 void GetValueAndDerivative( const TransformParametersType & parameters, 00090 MeasureType& Value, DerivativeType& Derivative ) const; 00091 00092 protected: 00093 MeanSquaresPointSetToImageMetric(); 00094 virtual ~MeanSquaresPointSetToImageMetric() {}; 00095 00096 private: 00097 MeanSquaresPointSetToImageMetric(const Self&); //purposely not implemented 00098 void operator=(const Self&); //purposely not implemented 00099 00100 }; 00101 00102 } // end namespace itk 00103 00104 #ifndef ITK_MANUAL_INSTANTIATION 00105 #include "itkMeanSquaresPointSetToImageMetric.txx" 00106 #endif 00107 00108 #endif 00109 00110 00111 00112