[Insight-users] Possible Error in itkDeformableMesh3DFilter
Thomas Boettger
t . boettger at dkfz-heidelberg . de
Mon, 04 Aug 2003 14:04:32 +0200
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