[Insight-users] program crash using : itkDeformableSimplexMesh3DGradientConstraintForceFilter

Alexandre GOUAILLARD agouaillard at gmail.com
Fri Feb 19 00:28:59 EST 2010


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
>


More information about the Insight-users mailing list