From: tbaudier Date: Tue, 18 Sep 2018 13:55:24 +0000 (+0200) Subject: Ensure compatibility with ITK < 4.12 for throw exception X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=commitdiff_plain;h=0a6ce0aedf87be56afa381561b8d5b7b7822fa15;p=clitk.git Ensure compatibility with ITK < 4.12 for throw exception --- diff --git a/itk/RelativePositionPropImageFilter.h b/itk/RelativePositionPropImageFilter.h index 4b30db1..e876f9f 100644 --- a/itk/RelativePositionPropImageFilter.h +++ b/itk/RelativePositionPropImageFilter.h @@ -169,8 +169,11 @@ namespace itk } } - +#if ( ( ITK_VERSION_MAJOR == 4 ) && ( ITK_VERSION_MINOR > 12 ) || ( ITK_VERSION_MAJOR > 4 )) virtual void GenerateInputRequestedRegion() ITK_OVERRIDE; +#else + virtual void GenerateInputRequestedRegion() throw(InvalidRequestedRegionError) ITK_OVERRIDE; +#endif void EnlargeOutputRequestedRegion (DataObject * output) ITK_OVERRIDE; protected: diff --git a/itk/RelativePositionPropImageFilter.txx b/itk/RelativePositionPropImageFilter.txx index 3ee1d0f..c34c7c3 100644 --- a/itk/RelativePositionPropImageFilter.txx +++ b/itk/RelativePositionPropImageFilter.txx @@ -50,7 +50,11 @@ namespace itk template void RelativePositionPropImageFilter +#if ( ( ITK_VERSION_MAJOR == 4 ) && ( ITK_VERSION_MINOR > 12 ) || ( ITK_VERSION_MAJOR > 4 )) ::GenerateInputRequestedRegion() +#else + ::GenerateInputRequestedRegion() throw (InvalidRequestedRegionError) +#endif { // call the superclass' implementation of this method Superclass::GenerateInputRequestedRegion (); diff --git a/itk/clitkBackProjectImageFilter.h b/itk/clitkBackProjectImageFilter.h index cb68779..9ffaffb 100644 --- a/itk/clitkBackProjectImageFilter.h +++ b/itk/clitkBackProjectImageFilter.h @@ -210,7 +210,11 @@ namespace clitk void SetOutputParametersFromImage( const OutputImageConstPointer image ); +#if ( ( ITK_VERSION_MAJOR == 4 ) && ( ITK_VERSION_MINOR > 12 ) || ( ITK_VERSION_MAJOR > 4 )) void Initialize(void); +#else + void Initialize(void) throw (itk::ExceptionObject); +#endif protected: diff --git a/itk/clitkBackProjectImageFilter.txx b/itk/clitkBackProjectImageFilter.txx index e643226..fa8d261 100644 --- a/itk/clitkBackProjectImageFilter.txx +++ b/itk/clitkBackProjectImageFilter.txx @@ -190,7 +190,11 @@ namespace clitk template void BackProjectImageFilter +#if ( ( ITK_VERSION_MAJOR == 4 ) && ( ITK_VERSION_MINOR > 12 ) || ( ITK_VERSION_MAJOR > 4 )) ::Initialize( void ) +#else + ::Initialize( void ) throw (itk::ExceptionObject) +#endif { //Change the origin of the 2D input typename InputImageType::ConstPointer inputPtr=this->GetInput(); diff --git a/registration/clitkCorrelationRatioImageToImageMetric.h b/registration/clitkCorrelationRatioImageToImageMetric.h index 51e15ae..a4bc342 100644 --- a/registration/clitkCorrelationRatioImageToImageMetric.h +++ b/registration/clitkCorrelationRatioImageToImageMetric.h @@ -105,7 +105,11 @@ public: * (1) making sure that all the components are present and plugged * together correctly, * (3) allocate memory for bin data structures. */ +#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 derivatives of the match measure. */ void GetDerivative( const TransformParametersType & parameters, diff --git a/registration/clitkCorrelationRatioImageToImageMetric.txx b/registration/clitkCorrelationRatioImageToImageMetric.txx index 685a043..1454539 100644 --- a/registration/clitkCorrelationRatioImageToImageMetric.txx +++ b/registration/clitkCorrelationRatioImageToImageMetric.txx @@ -51,7 +51,11 @@ CorrelationRatioImageToImageMetric template void CorrelationRatioImageToImageMetric +#if ( ( ITK_VERSION_MAJOR == 4 ) && ( ITK_VERSION_MINOR > 12 ) || ( ITK_VERSION_MAJOR > 4 )) ::Initialize(void) +#else +::Initialize(void) throw ( ExceptionObject ) +#endif { this->Superclass::Initialize(); diff --git a/registration/clitkOptNormalizedCorrelationImageToImageMetric.h b/registration/clitkOptNormalizedCorrelationImageToImageMetric.h index 12a90ec..067cd87 100644 --- a/registration/clitkOptNormalizedCorrelationImageToImageMetric.h +++ b/registration/clitkOptNormalizedCorrelationImageToImageMetric.h @@ -95,7 +95,11 @@ public: * (2) uniformly select NumberOfSpatialSamples within * the FixedImageRegion, and * (3) allocate memory for pdf data structures. */ +#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 ( itk::ExceptionObject ) ITK_OVERRIDE; +#endif /** Get the value. */ MeasureType GetValue( const ParametersType & parameters ) const ITK_OVERRIDE; diff --git a/registration/clitkOptNormalizedCorrelationImageToImageMetric.txx b/registration/clitkOptNormalizedCorrelationImageToImageMetric.txx index b5d28cc..ea2c52a 100644 --- a/registration/clitkOptNormalizedCorrelationImageToImageMetric.txx +++ b/registration/clitkOptNormalizedCorrelationImageToImageMetric.txx @@ -117,7 +117,11 @@ NormalizedCorrelationImageToImageMetric template void NormalizedCorrelationImageToImageMetric +#if ( ( ITK_VERSION_MAJOR == 4 ) && ( ITK_VERSION_MINOR > 12 ) || ( ITK_VERSION_MAJOR > 4 )) ::Initialize(void) +#else +::Initialize(void) throw ( itk::ExceptionObject ) +#endif { this->Superclass::Initialize(); diff --git a/registration/clitkOptNormalizedCorrelationImageToImageMetricFor3DBLUTFFD.h b/registration/clitkOptNormalizedCorrelationImageToImageMetricFor3DBLUTFFD.h index 6718316..208cb38 100644 --- a/registration/clitkOptNormalizedCorrelationImageToImageMetricFor3DBLUTFFD.h +++ b/registration/clitkOptNormalizedCorrelationImageToImageMetricFor3DBLUTFFD.h @@ -95,7 +95,11 @@ public: * (2) uniformly select NumberOfSpatialSamples within * the FixedImageRegion, and * (3) allocate memory for pdf data structures. */ +#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 ( itk::ExceptionObject ) ITK_OVERRIDE; +#endif /** Get the value. */ MeasureType GetValue( const ParametersType & parameters ) const ITK_OVERRIDE; diff --git a/registration/clitkOptNormalizedCorrelationImageToImageMetricFor3DBLUTFFD.txx b/registration/clitkOptNormalizedCorrelationImageToImageMetricFor3DBLUTFFD.txx index 0389fc5..042b4b7 100644 --- a/registration/clitkOptNormalizedCorrelationImageToImageMetricFor3DBLUTFFD.txx +++ b/registration/clitkOptNormalizedCorrelationImageToImageMetricFor3DBLUTFFD.txx @@ -117,7 +117,11 @@ NormalizedCorrelationImageToImageMetricFor3DBLUTFFD template void NormalizedCorrelationImageToImageMetricFor3DBLUTFFD +#if ( ( ITK_VERSION_MAJOR == 4 ) && ( ITK_VERSION_MINOR > 12 ) || ( ITK_VERSION_MAJOR > 4 )) ::Initialize(void) +#else +::Initialize(void) throw ( itk::ExceptionObject ) +#endif { this->Superclass::Initialize(); diff --git a/registration/itkOptMattesMutualInformationImageToImageMetricFor3DBLUTFFD.h b/registration/itkOptMattesMutualInformationImageToImageMetricFor3DBLUTFFD.h index 9973cc6..c51414e 100644 --- a/registration/itkOptMattesMutualInformationImageToImageMetricFor3DBLUTFFD.h +++ b/registration/itkOptMattesMutualInformationImageToImageMetricFor3DBLUTFFD.h @@ -187,7 +187,11 @@ public: * (2) uniformly select NumberOfSpatialSamples within * the FixedImageRegion, and * (3) allocate memory for pdf data structures. */ +#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 ITK_OVERRIDE; diff --git a/registration/itkOptMattesMutualInformationImageToImageMetricFor3DBLUTFFD.txx b/registration/itkOptMattesMutualInformationImageToImageMetricFor3DBLUTFFD.txx index 592fe22..ef4257e 100644 --- a/registration/itkOptMattesMutualInformationImageToImageMetricFor3DBLUTFFD.txx +++ b/registration/itkOptMattesMutualInformationImageToImageMetricFor3DBLUTFFD.txx @@ -183,7 +183,11 @@ MattesMutualInformationImageToImageMetricFor3DBLUTFFD template void MattesMutualInformationImageToImageMetricFor3DBLUTFFD +#if ( ( ITK_VERSION_MAJOR == 4 ) && ( ITK_VERSION_MINOR > 12 ) || ( ITK_VERSION_MAJOR > 4 )) ::Initialize(void) +#else +::Initialize(void) throw ( ExceptionObject ) +#endif { this->Superclass::Initialize(); this->Superclass::MultiThreadingInitialize(); diff --git a/registration/itkOptMeanSquaresImageToImageMetricFor3DBLUTFFD.h b/registration/itkOptMeanSquaresImageToImageMetricFor3DBLUTFFD.h index ffa6ac9..e12b42f 100644 --- a/registration/itkOptMeanSquaresImageToImageMetricFor3DBLUTFFD.h +++ b/registration/itkOptMeanSquaresImageToImageMetricFor3DBLUTFFD.h @@ -98,7 +98,11 @@ public: * (2) uniformly select NumberOfSpatialSamples within * the FixedImageRegion, and * (3) allocate memory for pdf data structures. */ +#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 ITK_OVERRIDE; diff --git a/registration/itkOptMeanSquaresImageToImageMetricFor3DBLUTFFD.txx b/registration/itkOptMeanSquaresImageToImageMetricFor3DBLUTFFD.txx index af1c986..02427a3 100644 --- a/registration/itkOptMeanSquaresImageToImageMetricFor3DBLUTFFD.txx +++ b/registration/itkOptMeanSquaresImageToImageMetricFor3DBLUTFFD.txx @@ -100,7 +100,11 @@ MeanSquaresImageToImageMetricFor3DBLUTFFD template void MeanSquaresImageToImageMetricFor3DBLUTFFD +#if ( ( ITK_VERSION_MAJOR == 4 ) && ( ITK_VERSION_MINOR > 12 ) || ( ITK_VERSION_MAJOR > 4 )) ::Initialize(void) +#else +::Initialize(void) throw ( ExceptionObject ) +#endif { this->Superclass::Initialize();