<table cellspacing="0" cellpadding="0" border="0" ><tr><td valign="top" style="font: inherit;"><div id="yiv1985668164"><table id="yiv1985668164bodyDrftID" class="yiv1985668164" border="0" cellpadding="0" cellspacing="0"><tbody><tr><td id="yiv1985668164drftMsgContent" style="font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; font-size-adjust: inherit; font-stretch: inherit; font-family: arial; font-size: 10pt;"><div id="yiv1985668164"><table id="yiv1985668164bodyDrftID" class="yiv1985668164" border="0" cellpadding="0" cellspacing="0"><tbody><tr><td id="yiv1985668164drftMsgContent" style="font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; font-size-adjust: inherit; font-stretch: inherit; font-family: arial; font-size: 10pt;">Hi<br><br>I'm starting to use ITK toolkit and I'm interested in working using several threads. Until now, I have been doing tests using "itkFlipImageFilter"
 (according to ITK documentation, it's a multhreaded filter). The main program runs fine, but I think only one thread is spawned because I switch on/off one core and execution times are similar (I'm working on Linux and processor has 2 cores). I compile the next code (this example is provided
 by ITK toolkit):<br><br>int main( int argc, char * argv[] )<br>{<br>&nbsp; typedef&nbsp;&nbsp; unsigned char&nbsp; PixelType;<br><br>&nbsp;<span style="text-decoration: underline;"> itk::MultiThreader::SetGlobalDefaultNumberOfThreads(2); </span><br><br>&nbsp; typedef itk::Image&lt; PixelType,&nbsp; 2 &gt;&nbsp;&nbsp; ImageType;<br><br>&nbsp; typedef
 itk::ImageFileReader&lt; ImageType &gt;&nbsp; ReaderType;<br>&nbsp; typedef itk::ImageFileWriter&lt; ImageType &gt;&nbsp; WriterType;<br><br>&nbsp; ReaderType::Pointer reader = ReaderType::New();<br>&nbsp; WriterType::Pointer writer = WriterType::New();<br><br>&nbsp; reader-&gt;SetFileName("example.jpg");<br>&nbsp; writer-&gt;SetFileName("example2.jpg");<br><br>&nbsp; typedef itk::FlipImageFilter&lt; ImageType &gt;&nbsp; FilterType;<br><br>&nbsp; FilterType::Pointer filter = FilterType::New();<br><br>&nbsp; typedef FilterType::FlipAxesArrayType&nbsp;&nbsp;&nbsp;&nbsp; FlipAxesArrayType;<br>&nbsp; <br>&nbsp; FlipAxesArrayType flipArray;<br><br>&nbsp; flipArray[0] = 1;<br>&nbsp; flipArray[1] = 0;<br><br>&nbsp; filter-&gt;SetFlipAxes( flipArray );<br>&nbsp; <br>&nbsp; filter-&gt;SetInput( reader-&gt;GetOutput() );<br>&nbsp; writer-&gt;SetInput( filter-&gt;GetOutput() );<br>&nbsp; writer-&gt;Update();<br>&nbsp;<br>&nbsp; return
 EXIT_SUCCESS;<br>}<br><br><br>&nbsp;ITK toolkit and my example are compiled in Debug mode.<br><br>Thank you<br><br>P.S. Sorry, my English is not very good.<br></td></tr></tbody></table></div></td></tr></tbody></table></div></td></tr></table><br>