From: dsarrut Date: Wed, 8 Sep 2010 14:14:08 +0000 (+0000) Subject: add thread verbose X-Git-Tag: v1.2.0~400 X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=commitdiff_plain;h=5cc64cb817d78d671eb20d219cc19f9ad5b1e5c1;p=clitk.git add thread verbose --- diff --git a/registration/clitkBLUTDIRGenericFilter.cxx b/registration/clitkBLUTDIRGenericFilter.cxx index 598870e..02ce0dd 100755 --- a/registration/clitkBLUTDIRGenericFilter.cxx +++ b/registration/clitkBLUTDIRGenericFilter.cxx @@ -575,7 +575,10 @@ void BLUTDIRGenericFilter::UpdateWithInputImageType() if (movingMask) metric->SetMovingImageMask(movingMask); #ifdef ITK_USE_OPTIMIZED_REGISTRATION_METHODS - if (threadsGiven) metric->SetNumberOfThreads( threads ); + if (threadsGiven) { + metric->SetNumberOfThreads( threads ); + if (m_Verbose) std::cout<< "Using " << threads << " threads." << std::endl; + } #else if (m_Verbose) std::cout<<"Not setting the number of threads (not compiled with USE_OPTIMIZED_REGISTRATION_METHODS)..."<SetOptimizer( optimizer ); registration->SetInterpolator( interpolator ); registration->SetTransform (transform); - if(threadsGiven) registration->SetNumberOfThreads(threads); + if(threadsGiven) { + registration->SetNumberOfThreads(threads); + if (m_Verbose) std::cout<< "Using " << threads << " threads." << std::endl; + } registration->SetFixedImage( croppedFixedImage ); registration->SetMovingImage( movingImage ); registration->SetFixedImageRegion( metricRegion ); @@ -836,4 +842,4 @@ void BLUTDIRGenericFilter::UpdateWithInputImageType() } }//end clitk -#endif // #define clitkBLUTDIRGenericFilter_txx \ No newline at end of file +#endif // #define clitkBLUTDIRGenericFilter_txx