[Insight-developers] Multithreaded exception handling in itkConnectedComponentImageFilter

Hans Johnson hans-johnson at uiowa.edu
Sat Apr 4 09:24:25 EDT 2009


Gaetan,

THANKS.
Hans



On 4/3/09 5:09 PM, "Gaëtan Lehmann" <gaetan.lehmann at jouy.inra.fr> wrote:

> 
> Hi Hans,
> 
> I've made the multithreaded part - I guess I've missed a case.
> I'll look at it soon.
> 
> Gaëtan
> 
> 
> 
> Le 3 avr. 09 à 23:08, Hans Johnson a écrit :
> 
>> All,
>> 
>> Sorry to complain, and not provide a fix.  But here is the
>> situation, I have a program that uses the
>> itkConnectedComponentImageFilter, and when I set
>> ITK_GLOBAL_DEFAULT_NUMBER_OF_THREADS=1,  the exception at line 345
>> is of src/include/InsightToolkit/BasicFilters/
>> itkConnectedComponentImageFilter.txx  is thrown (proper behavior)
>> 
>> When ITK_GLOBAL_DEFAULT_NUMBER_OF_THREADS=8;  the same code enters
>> into an infinite loop that never exits.
>> 
>>     336   if( threadId == 0 )
>>     337     {
>>     338     unsigned long int totalLabs = CreateConsecutive();
>>     339     m_ObjectCount = totalLabs;
>>     340     // check for overflow exception here
>>     341     if( totalLabs > static_cast<unsigned long int>(
>>     342             NumericTraits<OutputPixelType>::max() ) )
>>     343       {
>>     344       itkExceptionMacro(
>>     345         << "Number of objects greater than maximum of output
>> pixel type " );
>>     346       }
>>     347     }
>>     348   this->Wait();
>>     349
>> 
>> I was wondering what the correct behavior is supposed to be in a
>> case like this.
>> 
>> http://public.kitware.com/Bug/view.php?id=8839
>> 
>> 
>> Thanks,
>> Hans
>> Notice: This UI Health Care e-mail (including attachments) is
>> covered by the Electronic Communications Privacy Act, 18 U.S.C.
>> 2510-2521, is confidential and may be legally privileged.  If you
>> are not the intended recipient, you are hereby notified that any
>> retention, dissemination, distribution, or copying of this
>> communication is strictly prohibited.  Please reply to the sender
>> that you have received the message in error, then delete it.  Thank
>> you.
>> 
>> _______________________________________________
>> Powered by www.kitware.com
>> 
>> Visit other Kitware open-source projects at
>> http://www.kitware.com/opensource/opensource.html
>> 
>> Please keep messages on-topic and check the ITK FAQ at:
>> http://www.itk.org/Wiki/ITK_FAQ
>> 
>> Follow this link to subscribe/unsubscribe:
>> http://www.itk.org/mailman/listinfo/insight-developers



More information about the Insight-developers mailing list