[Insight-developers] Recent changes to arrow code are causing numerical exceptions

Bill Lorensen bill.lorensen at gmail.com
Mon Jun 14 09:02:30 EDT 2010


OK, here is the problem I think.

The zero divide is occurring in itkMetaArrowConverterTest at the
newMetaDirectionNorm.Normalize();
The newMetaOrientation is all zeroes...
Looking back, the direction is obtained from newMetaArrow which is
created by the converter.

The converter internally creates a smartpointer to a spatialobject and
returns it. I believe this is not correct. Doesn't the smartpointer go
away when it loses scope?

Looks like the code has been there for 5 1/2 years. Looking at an old
coverage log:
http://www.cdash.org/CDash/viewCoverageFile.php?buildid=623555&fileid=10859113
seems like the MetaArrowConverter class was never tested.

Bill


On Mon, Jun 14, 2010 at 7:40 AM, Luis Ibanez <luis.ibanez at kitware.com> wrote:
>
> Hi Gabe,
>
> Can you please take a look at this problem ?
>
> A common cause is to have divisions by zero...
> (but there may be other reasons..).
>
>
>   Thanks
>
>
>       Luis
>
>
> ---------------------------------------------------------------------------
> On Sun, Jun 13, 2010 at 11:53 AM, Bill Lorensen <bill.lorensen at gmail.com>
> wrote:
>>
>> Folks,
>>
>> I did not try to track down the culprit, but recent changes to the
>> spatial object arrow code is causing numerical exceptions on the
>> borland compiler.
>>
>> http://www.cdash.org/CDash/testSummary.php?project=2&name=itkMetaArrowConverterTest&date=2010-06-13
>>
>> This is probably not Borland specific. The Borland compiler is the
>> only one that enables floating point exceptions.
>>
>> Bill
>> _______________________________________________
>> 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://kitware.com/products/protraining.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