From 5cc64cb817d78d671eb20d219cc19f9ad5b1e5c1 Mon Sep 17 00:00:00 2001 From: dsarrut Date: Wed, 8 Sep 2010 14:14:08 +0000 Subject: [PATCH] add thread verbose --- registration/clitkBLUTDIRGenericFilter.cxx | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) 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 -- 2.47.1