[Insight-developers] Re: Unsafe code in ObjectMorphologyImageFilter
Stephen R. Aylward
aylward at unc . edu
Sun, 17 Aug 2003 19:08:51 -0400
Hi,
Julien has been working on this as well, and I took a look at it too - I
am not sure what's up since it even fails on single thread. I'll bump
it up on my to-do list.
Thanks!
Stephen
Lorensen, William E (Research) wrote:
> Steven
> I noticed intermittent test failures for the subject filter. I tracked the
> problem down to the ThreadedGenerateData method. There is a loop that copies
> data from the input to the output region. Unfortunately, since the region
> extends beyond the pixels that should be updated in a thread, some of this
> pixels overlay pixels in other threads. As a temporary fix, I put a mutex
> around the loop. The real fix would be to just copy the pixels that will be
> affected in a given thread. Then the mutex can be removed.
>
> Forget half of what I just said...
> After putting in the mutex, I get different failures. I think the filter
> needs to be reviewed further for thread safety. I suspect the
> IsObjectPixelOnBoundary is messing up. For now, I've set the number of
> threads to 1 for this filter.
>
> Bill