<html><body><div style="color:#000; background-color:#fff; font-family:HelveticaNeue, Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif;font-size:12pt">Thank you, Bill. That worked.<br><br>Emma.<br><div><span></span></div><div style="display: block;" class="yahoo_quoted"> <br> <br> <div style="font-family: HelveticaNeue, Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif; font-size: 12pt;"> <div style="font-family: HelveticaNeue, Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif; font-size: 12pt;"> <div dir="ltr"> <font face="Arial" size="2"> On Wednesday, March 26, 2014 11:48 AM, Bill Lorensen <bill.lorensen@gmail.com> wrote:<br> </font> </div> <div class="y_msg_container">Make this call in your main program:<br clear="none"><br clear="none"> itk::MultiThreader::SetGlobalDefaultNumberOfThreads(1);<br clear="none"><br clear="none"><br clear="none"><div class="yqt7962967810" id="yqtfd15654"><br clear="none">On
Wed, Mar 26, 2014 at 10:40 AM, Emma Ryan <<a shape="rect" ymailto="mailto:eryanvtk@yahoo.com" href="mailto:eryanvtk@yahoo.com">eryanvtk@yahoo.com</a>> wrote:<br clear="none">> Hi ,<br clear="none">><br clear="none">> How does one set this variable within the code ?<br clear="none">><br clear="none">> I use a bunch of itk filters to process some images. I have built ITK with<br clear="none">> default settings which I'm guessing includes multithreading.<br clear="none">><br clear="none">> I have not explicitly declared itk::MultiThreader class in my application.<br clear="none">> but I know there is some multithreading going on and I would like to turn it<br clear="none">> off. I read somewhere that I could use the command<br clear="none">> itk::MultiThreader::SetGlobalDefaultNumberOfThreads(1) to do so.<br clear="none">><br clear="none">> But using the above in my line in my code gives me
redeclaration errors.<br clear="none">><br clear="none">> Using extern also didn't help.<br clear="none">><br clear="none">> Here's a snippet of what I tried...<br clear="none">><br clear="none">> Following code included in my_itk_var.h<br clear="none">><br clear="none">> ifndef _my_itk_var_h_<br clear="none">> #define _my_itk_var_h_<br clear="none">><br clear="none">> extern itk::MultiThreader::SetGlobalDefaultNumberOfThreads(1)<br clear="none">><br clear="none">> #endif _my_itk_var_h_<br clear="none">><br clear="none">><br clear="none">> the file my_itk_var.h is included in many other c++ .h files.<br clear="none">><br clear="none">> Any help is appreciated.<br clear="none">><br clear="none">> thanks,<br clear="none">> Emma</div><br clear="none">><br clear="none">><br clear="none">> _____________________________________<br clear="none">> Powered by www.kitware.com<br
clear="none">><br clear="none">> Visit other Kitware open-source projects at<br clear="none">> <a shape="rect" href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br clear="none">><br clear="none">> Kitware offers ITK Training Courses, for more information visit:<br clear="none">> <a shape="rect" href="http://www.kitware.com/products/protraining.php" target="_blank">http://www.kitware.com/products/protraining.php</a><br clear="none">><br clear="none">> Please keep messages on-topic and check the ITK FAQ at:<br clear="none">> <a shape="rect" href="http://www.itk.org/Wiki/ITK_FAQ" target="_blank">http://www.itk.org/Wiki/ITK_FAQ</a><br clear="none">><br clear="none">> Follow this link to subscribe/unsubscribe:<br clear="none">> <a shape="rect" href="http://www.itk.org/mailman/listinfo/insight-users"
target="_blank">http://www.itk.org/mailman/listinfo/insight-users</a><br clear="none">><br clear="none"><br clear="none"><br clear="none"><br clear="none">-- <br clear="none">Unpaid intern in BillsBasement at noware dot com<div class="yqt7962967810" id="yqtfd03848"><br clear="none"></div><br><br></div> </div> </div> </div> </div></body></html>