X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=registration%2FclitkNormalizedCorrelationImageToImageMetric.h;h=0dd921bdf63c0c355dfdfb7908ad4b0a33c80e43;hb=aa66e8e3252e2d42c7a1fd8b21336a5a0a65835d;hp=e6b704b39967fa9744e26e12b5fe1211226c164c;hpb=10ab5094ede8057d004d0232ce74f9194f3ebe4e;p=clitk.git diff --git a/registration/clitkNormalizedCorrelationImageToImageMetric.h b/registration/clitkNormalizedCorrelationImageToImageMetric.h index e6b704b..0dd921b 100644 --- a/registration/clitkNormalizedCorrelationImageToImageMetric.h +++ b/registration/clitkNormalizedCorrelationImageToImageMetric.h @@ -23,96 +23,7 @@ // This line can be removed once the optimized versions // gets integrated into the main directories. #include "itkConfigure.h" - -#if defined(ITK_USE_OPTIMIZED_REGISTRATION_METHODS) || ITK_VERSION_MAJOR >= 4 #include "clitkOptNormalizedCorrelationImageToImageMetric.h" -#else - -#include "itkImageToImageMetric.h" -#include "itkCovariantVector.h" -#include "itkPoint.h" - - -namespace clitk -{ - -template < class TFixedImage, class TMovingImage > -class ITK_EXPORT NormalizedCorrelationImageToImageMetric : - public itk::ImageToImageMetric< TFixedImage, TMovingImage> -{ -public: - - /** Standard class typedefs. */ - typedef NormalizedCorrelationImageToImageMetric Self; - typedef itk::ImageToImageMetric Superclass; - - typedef itk::SmartPointer Pointer; - typedef itk::SmartPointer ConstPointer; - - /** Method for creation through the object factory. */ - itkNewMacro(Self); - - /** Run-time type information (and related methods). */ - itkTypeMacro(NormalizedCorrelationImageToImageMetric, itk::Object); - - - /** Types transferred from the base class */ - typedef typename Superclass::RealType RealType; - typedef typename Superclass::TransformType TransformType; - typedef typename Superclass::TransformPointer TransformPointer; - typedef typename Superclass::TransformParametersType TransformParametersType; - typedef typename Superclass::TransformJacobianType TransformJacobianType; - typedef typename Superclass::GradientPixelType GradientPixelType; - typedef typename Superclass::OutputPointType OutputPointType; - typedef typename Superclass::InputPointType InputPointType; - - typedef typename Superclass::MeasureType MeasureType; - typedef typename Superclass::DerivativeType DerivativeType; - typedef typename Superclass::FixedImageType FixedImageType; - typedef typename Superclass::MovingImageType MovingImageType; - typedef typename Superclass::FixedImageConstPointer FixedImageConstPointer; - typedef typename Superclass::MovingImageConstPointer MovingImageConstPointer; - - - /** Get the derivatives of the match measure. */ - void GetDerivative( const TransformParametersType & parameters, - DerivativeType & Derivative ) const; - - /** Get the value for single valued optimizers. */ - MeasureType GetValue( const TransformParametersType & parameters ) const; - - /** Get value and derivatives for multiple valued optimizers. */ - void GetValueAndDerivative( const TransformParametersType & parameters, - MeasureType& Value, DerivativeType& Derivative ) const; - - /** Set/Get SubtractMean boolean. If true, the sample mean is subtracted - * from the sample values in the cross-correlation formula and - * typically results in narrower valleys in the cost fucntion. - * Default value is false. */ - itkSetMacro( SubtractMean, bool ); - itkGetConstReferenceMacro( SubtractMean, bool ); - itkBooleanMacro( SubtractMean ); - -protected: - NormalizedCorrelationImageToImageMetric(); - virtual ~NormalizedCorrelationImageToImageMetric() {}; - void PrintSelf(std::ostream& os, itk::Indent indent) const; - -private: - NormalizedCorrelationImageToImageMetric(const Self&); //purposely not implemented - void operator=(const Self&); //purposely not implemented - - bool m_SubtractMean; - -}; - -} // end namespace clitk - -#ifndef ITK_MANUAL_INSTANTIATION -#include "clitkNormalizedCorrelationImageToImageMetric.txx" -#endif - -#endif // opt #endif // _clitkNormalizedCorrelationImageToImageMetric.txx