<div dir="ltr">Hi,<div style> 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 style>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 style><br></div><div style>Thanks</div><div style>Soren </div></div>