X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=registration%2FitkOptMattesMutualInformationImageToImageMetricFor3DBLUTFFD.h;h=79bd1c1796e578ea4038f00b74a8e663c4ccea2f;hb=378ee630dce37a3e15baf3a8027542c2f8cf43de;hp=54eedb8deb23ec5cb59d4f40e542906c4f2b651d;hpb=a6957c4825e83c61b977ec316dd841878617ffbd;p=clitk.git diff --git a/registration/itkOptMattesMutualInformationImageToImageMetricFor3DBLUTFFD.h b/registration/itkOptMattesMutualInformationImageToImageMetricFor3DBLUTFFD.h index 54eedb8..79bd1c1 100644 --- a/registration/itkOptMattesMutualInformationImageToImageMetricFor3DBLUTFFD.h +++ b/registration/itkOptMattesMutualInformationImageToImageMetricFor3DBLUTFFD.h @@ -35,11 +35,7 @@ #ifndef __itkOptMattesMutualInformationImageToImageMetricFor3DBLUTFFD_h #define __itkOptMattesMutualInformationImageToImageMetricFor3DBLUTFFD_h -#if ITK_VERSION_MAJOR >= 4 - #include "itkImageToImageMetric.h" -#else - #include "itkOptImageToImageMetric.h" -#endif +#include "itkImageToImageMetric.h" #include "itkCovariantVector.h" #include "itkPoint.h" #include "itkIndex.h" @@ -50,8 +46,6 @@ #include "itkBSplineDeformableTransform.h" #include "itkArray2D.h" -#include "itkMultiThreader.h" - namespace itk { @@ -191,19 +185,23 @@ public: * (2) uniformly select NumberOfSpatialSamples within * the FixedImageRegion, and * (3) allocate memory for pdf data structures. */ - virtual void Initialize(void) throw ( ExceptionObject ); +#if ( ( ITK_VERSION_MAJOR == 4 ) && ( ITK_VERSION_MINOR > 12 ) || ( ITK_VERSION_MAJOR > 4 )) + virtual void Initialize(void) ITK_OVERRIDE; +#else + virtual void Initialize(void) throw ( ExceptionObject ) ITK_OVERRIDE; +#endif /** Get the value. */ - MeasureType GetValue( const ParametersType & parameters ) const; + MeasureType GetValue( const ParametersType & parameters ) const ITK_OVERRIDE; /** Get the derivatives of the match measure. */ void GetDerivative( const ParametersType & parameters, - DerivativeType & Derivative ) const; + DerivativeType & Derivative ) const ITK_OVERRIDE; /** Get the value and derivatives for single valued optimizers. */ void GetValueAndDerivative( const ParametersType & parameters, MeasureType & Value, - DerivativeType & Derivative ) const; + DerivativeType & Derivative ) const ITK_OVERRIDE; /** Number of bins to used in the histogram. Typical value is 50. */ itkSetClampMacro( NumberOfHistogramBins, unsigned long, @@ -242,7 +240,7 @@ protected: MattesMutualInformationImageToImageMetricFor3DBLUTFFD(); virtual ~MattesMutualInformationImageToImageMetricFor3DBLUTFFD(); - void PrintSelf(std::ostream& os, Indent indent) const; + void PrintSelf(std::ostream& os, Indent indent) const ITK_OVERRIDE; private: @@ -313,7 +311,7 @@ private: FixedImageSampleContainer & samples ); /** Compute PDF derivative contribution for each parameter. */ - virtual void ComputePDFDerivatives( ThreadIdType threadID, + virtual void ComputePDFDerivatives( unsigned int threadID, unsigned int sampleNumber, int movingImageParzenWindowIndex, const ImageDerivativesType @@ -333,27 +331,27 @@ private: mutable bool m_ImplicitDerivativesSecondPass; - virtual inline void GetValueThreadPreProcess( ThreadIdType threadID, - bool withinSampleThread ) const; - virtual inline bool GetValueThreadProcessSample( ThreadIdType threadID, + virtual inline void GetValueThreadPreProcess( unsigned int threadID, + bool withinSampleThread ) const ITK_OVERRIDE; + virtual inline bool GetValueThreadProcessSample( unsigned int threadID, unsigned long fixedImageSample, const MovingImagePointType & mappedPoint, - double movingImageValue ) const; - virtual inline void GetValueThreadPostProcess( ThreadIdType threadID, - bool withinSampleThread ) const; + double movingImageValue ) const ITK_OVERRIDE; + virtual inline void GetValueThreadPostProcess( unsigned int threadID, + bool withinSampleThread ) const ITK_OVERRIDE; virtual inline void GetValueAndDerivativeThreadPreProcess( - ThreadIdType threadID, - bool withinSampleThread ) const; - virtual inline bool GetValueAndDerivativeThreadProcessSample( ThreadIdType threadID, + unsigned int threadID, + bool withinSampleThread ) const ITK_OVERRIDE; + virtual inline bool GetValueAndDerivativeThreadProcessSample( unsigned int threadID, unsigned long fixedImageSample, const MovingImagePointType & mappedPoint, double movingImageValue, const ImageDerivativesType & - movingImageGradientValue ) const; + movingImageGradientValue ) const ITK_OVERRIDE; virtual inline void GetValueAndDerivativeThreadPostProcess( - ThreadIdType threadID, - bool withinSampleThread ) const; + unsigned int threadID, + bool withinSampleThread ) const ITK_OVERRIDE; };