]> Creatis software - clitk.git/commitdiff
add thread verbose
authordsarrut <dsarrut>
Wed, 8 Sep 2010 14:14:08 +0000 (14:14 +0000)
committerdsarrut <dsarrut>
Wed, 8 Sep 2010 14:14:08 +0000 (14:14 +0000)
registration/clitkBLUTDIRGenericFilter.cxx

index 598870e77fea34b101f8254029cfc14c4efae4a9..02ce0ddf3a0452f17694e54d949cfc68e772fb4a 100755 (executable)
@@ -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)..."<<std::endl;
 #endif
@@ -602,7 +605,10 @@ void BLUTDIRGenericFilter::UpdateWithInputImageType()
     registration->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