[ITK-users] Floating point exception (core dumped) ConnectedComponentFilter

Bradly Lowekamp blowekamp at mail.nih.gov
Tue Jan 5 14:09:48 EST 2016


Hello,

Certainly more information about the nature of the exception would be good.

If this is indeed an C++  exception either std::exception of itk::ExceptionObject based, the try catch block will work. 

However floating point exceptions are usually a difference beast from C++ exception objects. Floating point exception occur during floating point computation in the FPU [1]. Generally the FPU can be configure to silently assign a predefined floating point value such as “nan”, or a signal can be generating terminating the program like in your case. The option can usually be configured with compilation flags, the run-time environment or the program itself.

HTH,
Brad


[1] https://en.wikipedia.org/wiki/IEEE_floating_point#Exception_handling

> On Jan 5, 2016, at 1:47 PM, Matt McCormick <matt.mccormick at kitware.com> wrote:
> 
> Hi,
> 
> Catching and print the exception can provide more information. See:
> 
>  http://itk.org/ITKExamples/src/Core/Common/TryCatchException/Documentation.html
> 
> for an example.
> 
> HTH,
> Matt
> 
> On Tue, Jan 5, 2016 at 8:51 AM, Bradley Lowekamp <blowekamp at mail.nih.gov> wrote:
>> Hello,
>> 
>> How big is your big image?
>> 
>> About how many connected components do you have?
>> 
>> Brad
>> 
>>> On Jan 5, 2016, at 5:33 AM, jud <digajjj62 at gmail.com> wrote:
>>> 
>>> Hi,
>>> 
>>> I have a problem when I use big images to find the connected componnents.
>>> When I execute the ConnectedComponentImageFilter the following appears:
>>> Floating point exception (core dumped)
>>> 
>>> typedef itk::Image <unsigned long, 3> ImageType;
>>> typedef itk::Image <unsigned long, 2> ImageType2;
>>> 
>>> typedef itk::ConnectedComponentImageFilter <ImageType2, ImageType2 >
>>> ConnectedComponentImageFilterType;
>>> ConnectedComponentImageFilterType::Pointer connected =
>>> ConnectedComponentImageFilterType::New ();
>>> connected->SetInput(image);
>>> connected->Update();
>>> 
>>> With small images this error doesn't happen.
>>> 
>>> Anyone have any idea?
>>> 
>>> Thanks!
>>> 
>>> 
>>> 
>>> --
>>> View this message in context: http://itk-users.7.n7.nabble.com/Floating-point-exception-core-dumped-ConnectedComponentFilter-tp36607.html
>>> Sent from the ITK - Users mailing list archive at Nabble.com.
>>> _____________________________________
>>> Powered by www.kitware.com
>>> 
>>> Visit other Kitware open-source projects at
>>> http://www.kitware.com/opensource/opensource.html
>>> 
>>> Kitware offers ITK Training Courses, for more information visit:
>>> http://www.kitware.com/products/protraining.php
>>> 
>>> 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://public.kitware.com/mailman/listinfo/insight-users
>> 
>> _____________________________________
>> Powered by www.kitware.com
>> 
>> Visit other Kitware open-source projects at
>> http://www.kitware.com/opensource/opensource.html
>> 
>> Kitware offers ITK Training Courses, for more information visit:
>> http://www.kitware.com/products/protraining.php
>> 
>> 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://public.kitware.com/mailman/listinfo/insight-users



More information about the Insight-users mailing list