X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=registration%2FclitkAffineRegistrationGenericFilter.cxx;h=f369e0506e838492f560f5f8e525771bf8cd377c;hb=103778ec7e0d03e32d9ecfa1306312d32d72ad4c;hp=3f0145eca9d10064044db55d8908f4aebc458633;hpb=4d95e8a4680c1f0e635da4a36b336d316f16b8ba;p=clitk.git diff --git a/registration/clitkAffineRegistrationGenericFilter.cxx b/registration/clitkAffineRegistrationGenericFilter.cxx index 3f0145e..f369e05 100644 --- a/registration/clitkAffineRegistrationGenericFilter.cxx +++ b/registration/clitkAffineRegistrationGenericFilter.cxx @@ -45,11 +45,11 @@ public: } // Execute - void Execute(itk::Object *caller, const itk::EventObject & event) { + void Execute(itk::Object *caller, const itk::EventObject & event) ITK_OVERRIDE { Execute( (const itk::Object *)caller, event); } - void Execute(const itk::Object * object, const itk::EventObject & event) { + void Execute(const itk::Object * object, const itk::EventObject & event) ITK_OVERRIDE { if ( !(itk::IterationEvent().CheckEvent( &event )) ) { return; } @@ -108,7 +108,7 @@ public: // Two arguments are passed to the Execute() method: the first // is the pointer to the object which invoked the event and the // second is the event that was invoked. - void Execute(itk::Object * object, const itk::EventObject & event) { + void Execute(itk::Object * object, const itk::EventObject & event) ITK_OVERRIDE { if ( !(itk::IterationEvent().CheckEvent( &event )) ) { return; } @@ -138,7 +138,7 @@ public: } } - void Execute(const itk::Object * , const itk::EventObject & ) { + void Execute(const itk::Object * , const itk::EventObject & ) ITK_OVERRIDE { return; } @@ -175,11 +175,8 @@ void AffineRegistrationGenericFilter::UpdateWithInputImageType() typedef typename InputImageType::PixelType PixelType; //typedef typename InputImageType::ImageDimension Dimension; - -#if defined(ITK_USE_OPTIMIZED_REGISTRATION_METHODS) || ITK_VERSION_MAJOR >= 4 bool threadsGiven=m_ArgsInfo.threads_given; int threads=m_ArgsInfo.threads_arg; -#endif //Coordinate Representation typedef double TCoordRep; @@ -396,11 +393,7 @@ void AffineRegistrationGenericFilter::UpdateWithInputImageType() typename MetricType::Pointer metric=genericMetric->GetMetricPointer(); if (movingMask) metric->SetMovingImageMask(movingMask); -#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(); + registration->Update(); } catch ( itk::ExceptionObject & err ) { std::cerr << "ExceptionObject caught !" << std::endl; std::cerr << err << std::endl;