[Insight-users] crashes N-D Linear Time Exact Signed Euclidean Distance Transform

Richard Beare richard.beare at gmail.com
Thu May 29 19:10:06 EDT 2008


Hi,

This is slightly off topic, but if you are experimenting with distance
transforms it might be worth checking out my recent addition to IJ -
parabolic morphology. Parabolic structuring elements are can be use to
compute exact distance transforms, and I've included some filters that
compute signed and one sided versions. In theory it should work in N
dimensions, but I've only tested to 3.

On Fri, May 30, 2008 at 9:02 AM, Bill Lorensen <bill.lorensen at gmail.com> wrote:
> Oleksandr,
>
> That's not a good error and may explain your problem. An invalid write
> means that it is trying to write to memory that is not allocated.
>
> You must be building release. If you build debug, valgrind will give
> the exact offending line.
>
> Bill
>
> On Thu, May 29, 2008 at 5:42 PM, Oleksandr Dzyubak <adzyubak at gmail.com> wrote:
>> Hi Bill,
>>
>> I ran valgrind on my box.
>>
>> dzyubak at debian: /Images$ valgrind --tool=memcheck
>> ./SignedMaurerDistanceMapImageFilterTest SquareBinary201.hdr test.hdr
>>
>> I got several interesting results.
>>
>> 1) Running valgrind on an executable results in producing output image which
>> matches that
>> in the archive. This never happens if I just run an executable since a
>> program aborts right away.
>>
>> 2) Valgrind produces a huge log with errors. In the end it says:
>>
>> ==15656== ERROR SUMMARY: 29 errors from 7 contexts (suppressed: 69 from 1).
>>
>> 3) And it starts its log with as below.
>>
>> ==15656== Invalid write of size 8
>> ==15656==    at 0x40DF148: itk::AnalyzeImageIO::ReadImageInformation() (in
>> /usr/local/lib/InsightToolkit/libITKIO.so.3.7.0)
>> ==15656==    by 0x80C66A6: itk::ImageFileReader<itk::Image<int, 2>,
>> itk::DefaultConvertPixelTraits<int> >::GenerateOutputInformation() (in
>> /home/dzyubak/Test/N-D_Linear_Time_Exact_Signed_Euclidean_Distance_Transform/Images/SignedMaurerDistanceMapImageFilterTest)
>>
>>
>> Is this memory block size mismatch coming from type traits or what?
>> Any ideas how to treat that?
>>
>> Thanks,
>> Alex
>>
>>
>> Bill Lorensen wrote:
>>>
>>> Oleksandr,
>>>
>>> If you have valgrind on your linux box, try running it. It can find
>>> some tricky memory problems.
>>>
>>> Bill
>>
>>
> _______________________________________________
> Insight-users mailing list
> Insight-users at itk.org
> http://www.itk.org/mailman/listinfo/insight-users
>


More information about the Insight-users mailing list