[Insight-users] Re: Possible Error in itkDeformableMesh3DFilter

Ting Chen chenting at graphics . cis . upenn . edu
Thu, 7 Aug 2003 15:58:23 -0400


Hi! Thomas, sorry for answering it late.

I think the purpose of setmeshstiffness is to help the user to assign
different stiffness matrix onto different triangular cells on the deformable
surface.

I assume there could be at most 10 different stiffness matrix be defined,
which are stored in the array of m_stiffnessmatrix. and this should be done
before calling the setmeshstiffness

and for each cell, m_k is the pointer to one of these stiffness matrix. so
in the loop below, we have already initialized the stiffness matrix.

I did several experiements using different stiffness parameters and there
are different performances. can you send me some image you are wokring on
with and some of your experimental code so I may help to see what could be
the problem?

thanks a lot your comments, hope to discuss on this topic more.

ting


----- Original Message -----
From: "Thomas Boettger" <t . boettger at dkfz-heidelberg . de>
To: <insight-users at public . kitware . com>
Cc: "Ting Chen" <chenting at graphics . cis . upenn . edu>
Sent: Monday, August 04, 2003 8:04 AM
Subject: Possible Error in itkDeformableMesh3DFilter


> Hello,
>
> I am currently writing a new filter based on the class
> itkDeformableMesh3DFilter. As I posted a few months ago I thought that
> the stiffness parameters are not taken into account. I downloaded the
> latest CVS version of the class and still experienced the same problem.
>
> After debugging my program I found the following code in method
> DeformableMesh3DFilter::SetMeshStiffness():
>
> ...
>    while (celldata != myCellData->End()){
>   x = celldata.Value();
>   m_K[j] = m_StiffnessMatrix+((int) x);    <----- critical
>   ++celldata;
>   j++;
>    }
> ...
>
> I am not sure what the developer intended to do when adding the celldata
> value to the current pointer in m_StiffnessMatrix. But only the first
> pointer of m_StiffnessMatrix[10] is currently intialized at all. So by
> performing the pointer arithmetic the m_K[j] pointers all contain
> pointers to unintialized values. Strange that the filter produced such
> senseful results under Windows anyway. When running the code on linux it
> somtimes produced very strange results. Thats where I found the
> uninitialised values usage.
>
> After a first modification in the itkDeformableMeshFilter where I
> initializes the whole m_StiffnessMatrix[] array. I saw the influence of
> the stiffness parameters to the segmentation result for the first time.
>
> I am not sure how this bug should be handled, if it should just be fixed
> or if the algorithm should be checked for correctness.
>
> My questions:
>
> 1. I would like to know on which paper this implementation is based.
> 2. What is the algorithmic sense of the applied pointer addition in
> SetMeshStiffness().
> 3. Or should the celldata value be added to the elements of the matrix?
> 4. What is the meaning of the celldata value anyway?
> 5. Why are the 10 stiffness matrices?
>
>
> Thanks in advance,
> Thomas Boettger
>
>
>
> --
> Dipl.-Inform. Thomas Boettger
> Deutsches Krebsforschungszentrum         (German Cancer Research Center)
> Div. Medical and Biological Informatics H0100    Tel: (+49) 6221-42 2328
> Im Neuenheimer Feld 280                          Fax: (+49) 6221-42 2345
> D-69120 Heidelberg                            e-mail: t . boettger at dkfz . de
> Germany                      http://www . dkfz . de/mbi/people/thomasb . shtml
>