00001 /*========================================================================= 00002 00003 Program: Insight Segmentation & Registration Toolkit 00004 Module: $RCSfile: itkMeanSquaresPointSetToImageMetric.h,v $ 00005 Language: C++ 00006 Date: $Date: 2005/03/29 18:55:24 $ 00007 Version: $Revision: 1.20 $ 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 00068 typedef typename Superclass::MeasureType MeasureType; 00069 typedef typename Superclass::DerivativeType DerivativeType; 00070 typedef typename Superclass::FixedPointSetType FixedPointSetType; 00071 typedef typename Superclass::MovingImageType MovingImageType; 00072 typedef typename Superclass::FixedPointSetConstPointer FixedPointSetConstPointer; 00073 typedef typename Superclass::MovingImageConstPointer MovingImageConstPointer; 00074 00075 typedef typename Superclass::PointIterator PointIterator; 00076 typedef typename Superclass::PointDataIterator PointDataIterator; 00077 00078 00080 void GetDerivative( const TransformParametersType & parameters, 00081 DerivativeType & Derivative ) const; 00082 00084 MeasureType GetValue( const TransformParametersType & parameters ) const; 00085 00087 void GetValueAndDerivative( const TransformParametersType & parameters, 00088 MeasureType& Value, DerivativeType& Derivative ) const; 00089 00090 protected: 00091 MeanSquaresPointSetToImageMetric(); 00092 virtual ~MeanSquaresPointSetToImageMetric() {}; 00093 00094 private: 00095 MeanSquaresPointSetToImageMetric(const Self&); //purposely not implemented 00096 void operator=(const Self&); //purposely not implemented 00097 00098 }; 00099 00100 } // end namespace itk 00101 00102 #ifndef ITK_MANUAL_INSTANTIATION 00103 #include "itkMeanSquaresPointSetToImageMetric.txx" 00104 #endif 00105 00106 #endif 00107 00108 00109