[Insight-users] program crash using : itkDeformableSimplexMesh3DGradientConstraintForceFilter

Noura AZZABOU n.azzabou at institut-myologie.org
Thu Feb 18 15:44:46 EST 2010


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




More information about the Insight-users mailing list