[Insight-developers] Threaded dilate/erode

Miller, James V (Research) millerjv at crd.ge.com
Fri Nov 18 11:38:54 EST 2005


Jerome, Gaetan, 

We have integrated the threaded versions of the binary dilate/erode into the ITK repository.  The use of the ProgressReporter needed to be changed slightly in the multithreaded versions to be thread safe.  One of the arguments to the ProgressReporter is the threadId.  Thread 0 is only one that outputs information by the ProgressReporter.  This argument was set to 0 for all threads, causing some intermittent errors.

I question whether stage 3 is really thread safe.  It looks like this loop can write to pixels that are outside the outputRegionForThread.  This could result in two threads writing to the same memory location at the same time.  This could result in corrupted memory and in some cases crashes.  Can you verify whether or not stage 3 could write to pixels that are outside the outputRegionForThread.

Minor point: ITK style guide requires that TABS be replaced with spaces.  It would make integrating contributed code into ITK smoother if your submissions used spaces for indentation instead of TABS.

Jim Miller 
_____________________________________
Visualization & Computer Vision
GE Research
Bldg. KW, Room C223
1 Research Circle, Schenectady NY 12309-1027

millerjv at research.ge.com <mailto:millerjv at research.ge.com>
(518) 387-4005, Dial Comm: 8*833-4005
Cell: (518) 505-7065, Fax: (518) 387-6981


-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.itk.org/mailman/private/insight-developers/attachments/20051118/d631b5ef/attachment.html


More information about the Insight-developers mailing list