<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=US-ASCII">
<TITLE></TITLE>
<META content="MSHTML 6.00.2800.1458" name=GENERATOR></HEAD>
<BODY text=#000000 bgColor=#ffffff>
<DIV><SPAN class=264435118-19112004><FONT face=Verdana color=#0000ff
size=2>Siwei,</FONT></SPAN></DIV>
<DIV><SPAN class=264435118-19112004><FONT face=Verdana color=#0000ff
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=264435118-19112004><FONT face=Verdana color=#0000ff size=2>The
LevelSetMotionRegistrationFunction calculates the speed value
as</FONT></SPAN></DIV>
<DIV><SPAN class=264435118-19112004><FONT face=Verdana color=#0000ff
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=264435118-19112004><FONT face=Verdana color=#0000ff
size=2> double speedValue = fixedValue -
movingValue;<BR></FONT></SPAN></DIV>
<DIV><SPAN class=264435118-19112004><FONT face=Verdana color=#0000ff
size=2>where</FONT></SPAN></DIV>
<DIV><SPAN class=264435118-19112004><FONT face=Verdana color=#0000ff
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=264435118-19112004><FONT face=Verdana color=#0000ff
size=2> fixedValue = (double) m_FixedImage->GetPixel( index
);<BR></FONT></SPAN></DIV>
<DIV><SPAN class=264435118-19112004><FONT face=Verdana color=#0000ff size=2>and
</FONT></SPAN></DIV>
<DIV><SPAN class=264435118-19112004><FONT face=Verdana color=#0000ff
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=264435118-19112004><FONT face=Verdana color=#0000ff
size=2> movingValue = m_MovingImageInterpolator->Evaluate( mappedPoint
);<BR></FONT></SPAN></DIV>
<DIV><SPAN class=264435118-19112004><FONT face=Verdana color=#0000ff
size=2>where mappedPoint is calculated as</FONT></SPAN></DIV>
<DIV><SPAN class=264435118-19112004><FONT face=Verdana color=#0000ff
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=264435118-19112004><FONT face=Verdana color=#0000ff
size=2> for( j = 0; j < ImageDimension; j++ )<BR>
{<BR> mappedPoint[j] = double( index[j] ) *
m_FixedImageSpacing[j] + <BR>
m_FixedImageOrigin[j];<BR> mappedPoint[j] +=
it.GetCenterPixel()[j];<BR> }<BR></FONT></SPAN></DIV>
<DIV><SPAN class=264435118-19112004><FONT face=Verdana color=#0000ff
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=264435118-19112004><FONT face=Verdana color=#0000ff size=2>In
the above loop, index[] is the index of the pixel under consideration in the
fixed image. By multiplying by the spacing and adding the origin, the
index[] is converted to a physical position in the fixed image. By adding
it.GetCenterPixel(), we are adding the current displacement field value to the
position, i.e. (u,v). So we evaluate the moving image at a position that takes
into account the current displacement field.</FONT></SPAN></DIV>
<DIV><SPAN class=264435118-19112004><FONT face=Verdana color=#0000ff
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=264435118-19112004><FONT face=Verdana color=#0000ff size=2>So
the speed value is calculated as I1(i,j) - I2(i-u, j-v)</FONT></SPAN></DIV>
<DIV><SPAN class=264435118-19112004><FONT face=Verdana color=#0000ff
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=264435118-19112004><FONT face=Verdana color=#0000ff size=2>Does
this clarify the code?</FONT></SPAN></DIV>
<DIV><SPAN class=264435118-19112004><FONT face=Verdana color=#0000ff
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=264435118-19112004><FONT face=Verdana color=#0000ff
size=2>Jim</FONT></SPAN></DIV>
<DIV><SPAN class=264435118-19112004><FONT face=Verdana color=#0000ff
size=2> </DIV></FONT></SPAN>
<DIV><SPAN class=264435118-19112004><FONT face=Verdana color=#0000ff
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=264435118-19112004><FONT face=Verdana color=#0000ff
size=2> </DIV></FONT></SPAN>
<DIV><SPAN class=264435118-19112004><FONT face=Verdana color=#0000ff
size=2> </DIV></FONT></SPAN>
<BLOCKQUOTE>
<DIV class=OutlookMessageHeader dir=ltr align=left><FONT face=Tahoma
size=2>-----Original Message-----<BR><B>From:</B> Siwei Yang
[mailto:s.yang@dkfz-heidelberg.de]<BR><B>Sent:</B> Friday, November 19, 2004
10:48 AM<BR><B>To:</B> insight-users@itk.org<BR><B>Subject:</B>
[Insight-users] Problem about
LevelSetMotionRegistrationFunction<BR><BR></FONT></DIV>Hello all, <BR>I want
to use the Levelsetmotionregistrationfilter, but in the ComputeUpdate
(LevelsetmotionregistrationFunction) I fand something doesn't seems to be
comprehensible<FONT size=2><SPAN style="FONT-SIZE: 10pt"></SPAN></FONT>.
According to equation 27 in the paper of (B.C. Vemuri, J. Ye, Y. Chen, C.M.
Leonard. "Image registration via level-set motion: applications to atlas-based
segmentation". Medical Image Analysis. Vol. 7. pp. 1-20. 2003.), the speed
term should be I2(ij) -I1(i-u..,
j-v..) instead of I2(ij)-I1(ij), which is in the
implementation. I' m not sure, if what I say is correct .
Perhaps some one can give me a good answer. <BR><BR>Thanks <BR>best wishes
<BR><BR>Siwei Yang </BLOCKQUOTE></BODY></HTML>