[ITK] [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://public.kitware.com/pipermail/community/attachments/20140326/bd65d991/attachment.html>
-------------- next part --------------
_____________________________________
Powered by www.kitware.com

Visit other Kitware open-source projects at
http://www.kitware.com/opensource/opensource.html

Kitware offers ITK Training Courses, for more information visit:
http://www.kitware.com/products/protraining.php

Please keep messages on-topic and check the ITK FAQ at:
http://www.itk.org/Wiki/ITK_FAQ

Follow this link to subscribe/unsubscribe:
http://www.itk.org/mailman/listinfo/insight-users


More information about the Community mailing list