[Insight-users] multi-threading exception thrown
Matei Stroila
matei.stroila at gmail.com
Thu Jan 25 12:02:25 EST 2007
Dear all,
Is it safe to call an ITK filter from a thread?
I am writing an application that uses several threads to process
independently one image per thread. The processing consists in several
chained filters. I run this on a WinXP desktop with 2 dual-core
processors (Xeon CPU 3.73GHz) with hyperthreading, so total of 8
logical processors. I use seven threads for image processing. I have
ITK 3.0. I use the wxWidgets threading classes.
I randomly get the following exception in different filters (this is
in a mask filter, it happened also in the watershed segmentation
filter):
Exception caught in mask filter:
d:\src\Insight\Code\Common\itkMultiThreader.cxx:368:
itk::ERROR: MultiThreader(31827EC0): Exception occurred during
SingleMethodExecute
I am not using directly the ITK multithreader class, but the filters I
use, use that.
I noticed that if I compile ITK with ITK_MAX_THREADS defined as 1,
this error no longer appeared, so far.
Thanks for help,
Matei
More information about the Insight-users
mailing list