[ITK-users] itk::MultiThreader::SetGlobalDefaultNumberOfThreads(1)
Bill Lorensen
bill.lorensen at gmail.com
Wed Mar 26 14:48:38 EDT 2014
Make this call in your main program:
itk::MultiThreader::SetGlobalDefaultNumberOfThreads(1);
On Wed, Mar 26, 2014 at 10:40 AM, Emma Ryan <eryanvtk at yahoo.com> wrote:
> 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
>
>
> _____________________________________
> 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
>
--
Unpaid intern in BillsBasement at noware dot com
More information about the Insight-users
mailing list