[Insight-users] Thread control

Cory Quammen cquammen at cs.unc.edu
Wed Jan 4 09:47:40 EST 2012


Lazar,

You can use the ITK_GLOBAL_DEFAULT_NUMBER_OF_THREADS environment
variable to set the number of threads that should be used by default
in each filter.

In code, you can specify the number of threads that a filter should
use by calling the SetNumberOfThreads() method. See
http://www.itk.org/Doxygen/html/classitk_1_1ProcessObject.html#ae5ccbe3a8c5687b4a82d3638b9e49409

Hope that helps,
Cory

On Wed, Jan 4, 2012 at 9:28 AM, Fleysher, Lazar
<lazar.fleysher at mountsinai.org> wrote:
> Hello everybody
>
> I noticed that filter class and some other classes use threads.
> It looks like the number of threads is found automatically.
> Is it possible to control the number of created threads, say via environment
> variable or in another way?
>
> Thank you very much
>
> Lazar
> _____________________________________
> 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.html
>
> 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



-- 
Cory Quammen
Research Associate
Department of Computer Science
The University of North Carolina at Chapel Hill


More information about the Insight-users mailing list