[Insight-users] RE : program crash using : itkDeformableSimplexMesh3DGradientConstraintForceFilter

Luis Ibanez luis.ibanez at kitware.com
Tue Feb 23 17:56:26 EST 2010


Alex, Noura,

This looks like an actual bug in the code.

we should be checking if the index is inside of the image
before calling GetPixel().

Noura,

Could you please report this bug in the ITK bug tracker

    http://public.kitware.com/Bug/my_view_page.php

and assign it to me ?


      Thanks


             Luis



------------------------------------------------
On Fri, Feb 19, 2010 at 4:49 AM, Alexandre GOUAILLARD
<agouaillard at gmail.com> wrote:
> hi noura,
>
> well, you would have to modify the filter in two ways:
>
> - include support for spacing
> - include out-of-bound checking
>
> My experience is that the filter fails because the points are moved
> out of the image and nothing prevents that from happening or checks if
> this is happening.
>
> Support for spacing is relatively easy (or not needed), boundary
> checking can be trickier. A brutal force approach is to check
> everytime you move a point, but I'm sure there would be a performance
> penalty, Another way would be to use an image iterator, but I'm not so
> familiar with those. Luis, would you have a suggestion here?
>
> alex.
>
>
> On Fri, Feb 19, 2010 at 5:33 PM, Noura AZZABOU
> <n.azzabou at institut-myologie.org> wrote:
>> Hi Alexandre,
>>
>> thank you for your answer. Do you have an idea how to fix the problem. I tried to set the spacing to one to be sure that the program works but it crashed too. I need to understant the NextVoxel function to figure out solutions.
>>
>> Regards
>>
>> ________________________________________
>> De : Alexandre GOUAILLARD [agouaillard at gmail.com]
>> Date d'envoi : vendredi 19 février 2010 06:28
>> À : Noura AZZABOU
>> Cc : itk
>> Objet : Re: [Insight-users] program crash using : itkDeformableSimplexMesh3DGradientConstraintForceFilter
>>
>> hi noura,
>>
>> Last time I looked, the simplex implementation was not taking spacing
>> into account (i.e. suppose the spacing is 1) and does not check if you
>> try to access pixels out of the defined image. It corresponds to what
>> you are experiencing.
>>
>> alex.
>>
>> On Fri, Feb 19, 2010 at 4:44 AM, Noura AZZABOU
>> <n.azzabou at institut-myologie.org> wrote:
>>> Hello,
>>>
>>> I am trying to use the extrenal forces defined in
>>>
>>> itkDeformableSimplexMesh3DGradientConstraintForceFilter.h
>>>
>>> the problem that I have a program crash when I tried to debug that I discovered that the program is trying to acess to a pixel that it is not in the image domain.
>>>
>>> this is a typical line where the error occured
>>>
>>>    vec_for[0] -= this->m_Gradient->GetPixel(coord)[0];  (coord value are exceding the image domain)
>>>
>>> when I look to the coord definition :
>>>
>>>  coord[0] = static_cast<ImageIndexValueType>(data->pos[0]);
>>>
>>>
>>> So coord refers to a  position of a vertex and this position is in mm (it is not the coordinate of the vertex in the image)
>>>
>>> it seems to me that there is a confusion between : pixels position and spatial position.  does it mean that this function works only if the pixel spacing is equal to one ??
>>>
>>> I was not able to understand the  NextVoxel fucntion ? can any body explian me the algorithm. it is clear that is the implementation of the Bresenham algorithm of 3D line reconstruction. I found the algorithm description of this algorithm in the internet but I was not able to understand the code in the Next Voxel function.
>>>
>>> did some one face the some problem as me. is there any description of the NextVoxel function ?? does it rely on the hypothesis that the  spacing is equal to one.
>>> last question : does this function correpond to the force described in Delingette papier published in
>>>
>>>
>>> General Object Reconstruction based on Simplex Meshes
>>> Hervé Delingette
>>> International Journal of Computer Vision, 32(2):111-146, September 1999
>>>
>>>
>>> thank you for your help
>>>
>>> Noura
>>>
>>>
>>> _____________________________________
>>> 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.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-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.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-users
>


More information about the Insight-users mailing list