X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=registration%2FclitkAffineRegistrationGenericFilter.cxx;h=6b0ecffbfdba87541e128945fceae0b13a0fcd5d;hb=bfd2c4f867ddeaa1fdb556c44e58aabe467e64b5;hp=0c93f78e624716eb218987557382489769c0eeab;hpb=765020625fbc092d283e221e36c83e60a1844cb7;p=clitk.git diff --git a/registration/clitkAffineRegistrationGenericFilter.cxx b/registration/clitkAffineRegistrationGenericFilter.cxx index 0c93f78..6b0ecff 100644 --- a/registration/clitkAffineRegistrationGenericFilter.cxx +++ b/registration/clitkAffineRegistrationGenericFilter.cxx @@ -176,7 +176,7 @@ void AffineRegistrationGenericFilter::UpdateWithInputImageType() //typedef typename InputImageType::ImageDimension Dimension; -#ifdef ITK_USE_OPTIMIZED_REGISTRATION_METHODS +#if defined(ITK_USE_OPTIMIZED_REGISTRATION_METHODS) || ITK_VERSION_MAJOR >= 4 bool threadsGiven=m_ArgsInfo.threads_given; int threads=m_ArgsInfo.threads_arg; #endif @@ -396,7 +396,7 @@ void AffineRegistrationGenericFilter::UpdateWithInputImageType() typename MetricType::Pointer metric=genericMetric->GetMetricPointer(); if (movingMask) metric->SetMovingImageMask(movingMask); -#ifdef ITK_USE_OPTIMIZED_REGISTRATION_METHODS +#if defined(ITK_USE_OPTIMIZED_REGISTRATION_METHODS) || ITK_VERSION_MAJOR >= 4 if (threadsGiven) metric->SetNumberOfThreads( threads ); #else if (m_Verbose) std::cout<<"Not setting the number of threads (not compiled with USE_OPTIMIZED_REGISTRATION_METHODS)..."<StartRegistration(); +#else + registration->Update(); +#endif } catch ( itk::ExceptionObject & err ) { std::cerr << "ExceptionObject caught !" << std::endl; std::cerr << err << std::endl;