<div dir="ltr">
<pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(128,0,128)">itk</span><span style="color:rgb(0,0,0)">::</span><span style="color:rgb(128,0,128)">DomainThreader did the job for future reference.</span></pre>
</div><div class="gmail_extra"><br><br><div class="gmail_quote">On Wed, May 15, 2013 at 11:37 PM, Soren Christensen <span dir="ltr"><<a href="mailto:sorench@gmail.com" target="_blank">sorench@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Hi,<div> I have an ImageToImageFilter subclass that currently is multithreaded by being split into equally sized regions (default behaviour). Only voxels inside a mask (2nd input) are processed in each thread. When I run the filter, some threads finish executing much quicker than others, because the number of pixels inside the mask differs in each subregion. Ideally each thread would process and equal number of voxels.</div>
<div>How can I achieve this? Is there an existing filter that can be subclassed for this purpose or should I I parallize a loop running over the mask indices manually? If so, what should I be looking at for parallizing on Linux?</div>
<div><br></div><div>Thanks</div><span class="HOEnZb"><font color="#888888"><div>Soren </div></font></span></div>
</blockquote></div><br></div>