[ITK-users] itk::MultiThreader::SetGlobalDefaultNumberOfThreads(1)
Emma Ryan
eryanvtk at yahoo.com
Wed Mar 26 13:40:02 EDT 2014
Hi ,
How does one set this variable within the code ?
I use a bunch of itk filters to process some images. I have built ITK with default settings which I'm guessing includes multithreading.
I have not explicitly declared itk::MultiThreader class in my application. but I know there is some multithreading going on and I would like to turn it off. I read somewhere that I could use the command itk::MultiThreader::SetGlobalDefaultNumberOfThreads(1) to do so.
But using the above in my line in my code gives me redeclaration errors.
Using extern also didn't help.
Here's a snippet of what I tried...
Following code included in my_itk_var.h
ifndef _my_itk_var_h_
#define _my_itk_var_h_
extern itk::MultiThreader::SetGlobalDefaultNumberOfThreads(1)
#endif _my_itk_var_h_
the file my_itk_var.h is included in many other c++ .h files.
Any help is appreciated.
thanks,
Emma
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.itk.org/pipermail/insight-users/attachments/20140326/bd65d991/attachment.html>
More information about the Insight-users
mailing list