[Insight-users] Problem with itkDeformableSimplexMesh3DFilter

Dženan Zukić dzenanz at gmail.com
Wed Jun 30 08:01:48 EDT 2010


Hi Yan,

Deformable simplex mesh filter uses image-coordinates, not physical
coordinates. You will have to transform your coordinates using
image->TransformPhysicalPointToContinuousIndex before passing your mesh into
this filter.

Regards,
Dženan

On Thu, Jun 24, 2010 at 16:31, Yan Geng <Yan.Geng at rwth-aachen.de> wrote:

> Hi,
>
> I'm trying to use itkDeformableSimplexMesh3DFilter and have problem by the
> calculation of external force.
>
> The simplex mesh is generated from labeled images. And I find out that the
> external force won't be calculated because the vertices in the mesh have
> wrong coordinates.
>
> I saw the flowing lines in the source code of
> itkDeformableSimplexMesh3DFilter
>
>
>  coord[0] = static_cast<GradientIndexValueType>(data->pos[0]);
>  coord[1] = static_cast<GradientIndexValueType>(data->pos[1]);
>  coord[2] = static_cast<GradientIndexValueType>(data->pos[2]);
>
>
>  if ( (coord[0] >= 0) && (coord[1] >= 0) && (coord[2] >= 0) &&
>       (coord2[0] < m_ImageWidth) && (coord2[1] < m_ImageHeight) &&
> (coord2[2] < m_ImageDepth) )
>
>
> I think  coord < 0 means this point is out of image and GetPixel(coord)[0]
> will crash. But it actually looks like this: http://bit.ly/bZCZsF  the
> mesh is still in the image.
>
> I'm not sure what I did wrong to use this filter.
>
> Thanks for your help,
>
> YG
> _____________________________________
> 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
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.itk.org/pipermail/insight-users/attachments/20100630/8ba82c60/attachment.htm>


More information about the Insight-users mailing list