X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=registration%2FclitkNormalizedCorrelationImageToImageMetricFor3DBLUTFFD.h;h=ad4a118a0c159495ebf7c24509a75638fa5d37bd;hb=f2abd66846f46f61e6f16e339da46515525826b1;hp=7a7d2b18e99d276f76dabf5d08dc61b8a0e109c4;hpb=05736c934c5ecc1c43179f93db6aa778272d5aa9;p=clitk.git diff --git a/registration/clitkNormalizedCorrelationImageToImageMetricFor3DBLUTFFD.h b/registration/clitkNormalizedCorrelationImageToImageMetricFor3DBLUTFFD.h index 7a7d2b1..ad4a118 100644 --- a/registration/clitkNormalizedCorrelationImageToImageMetricFor3DBLUTFFD.h +++ b/registration/clitkNormalizedCorrelationImageToImageMetricFor3DBLUTFFD.h @@ -24,96 +24,7 @@ // gets integrated into the main directories. #include "itkConfigure.h" -#if defined(ITK_USE_OPTIMIZED_REGISTRATION_METHODS) || ITK_VERSION_MAJOR >= 4 #include "clitkOptNormalizedCorrelationImageToImageMetricFor3DBLUTFFD.h" -#else - -#include "itkImageToImageMetric.h" -#include "itkCovariantVector.h" -#include "itkPoint.h" - - -namespace clitk -{ - -template < class TFixedImage, class TMovingImage > -class ITK_EXPORT NormalizedCorrelationImageToImageMetricFor3DBLUTFFD : - public itk::ImageToImageMetric< TFixedImage, TMovingImage> -{ -public: - - /** Standard class typedefs. */ - typedef NormalizedCorrelationImageToImageMetricFor3DBLUTFFD 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(NormalizedCorrelationImageToImageMetricFor3DBLUTFFD, 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: - NormalizedCorrelationImageToImageMetricFor3DBLUTFFD(); - virtual ~NormalizedCorrelationImageToImageMetricFor3DBLUTFFD() {}; - void PrintSelf(std::ostream& os, itk::Indent indent) const; - -private: - NormalizedCorrelationImageToImageMetricFor3DBLUTFFD(const Self&); //purposely not implemented - void operator=(const Self&); //purposely not implemented - - bool m_SubtractMean; - -}; - -} // end namespace clitk - -#ifndef ITK_MANUAL_INSTANTIATION -#include "clitkNormalizedCorrelationImageToImageMetricFor3DBLUTFFD.txx" -#endif - -#endif // opt - #endif // _clitkNormalizedCorrelationImageToImageMetricFor3DBLUTFFD.txx