<table cellspacing="0" cellpadding="0" border="0" ><tr><td valign="top" style="font: inherit;">Hi <br>&nbsp;<br>I'd like to know how to run several threads when I use a multithreaded-filter (e.g., FlipImageFilter). I have compiled the next code, but only one thread is spawned. The code is: <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>&nbsp;<br>
Thank you
<br><br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Marķa Dolores<br></td></tr></table><br>