<!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=841082014-22112004><FONT face=Verdana color=#0000ff
size=2>Siwei, </FONT></SPAN></DIV>
<DIV><SPAN class=841082014-22112004><FONT face=Verdana color=#0000ff
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=841082014-22112004><FONT face=Verdana color=#0000ff size=2>The
reason for the I1(i+u, j+v) instead of I1(i-u, j-v) is because ITK computes
deformation fields that map the Moving image back into the coordinate frame of
the Fixed image. So for any position in the Fixed image, you can add the vector
stored at that index in the deformation field to determine the
corresponding position in the Moving image.</FONT></SPAN></DIV>
<DIV><SPAN class=841082014-22112004><FONT face=Verdana color=#0000ff
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=841082014-22112004><FONT face=Verdana color=#0000ff size=2>The
direction of the deformation field is therefore different from the original
paper, but it</FONT></SPAN></DIV>
<DIV><SPAN class=841082014-22112004><FONT face=Verdana color=#0000ff
size=2>makes the registration consistent with the other registration methods in
ITK.</FONT></SPAN></DIV>
<DIV><SPAN class=841082014-22112004><FONT face=Verdana color=#0000ff
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=841082014-22112004><FONT face=Verdana color=#0000ff
size=2>Jim</FONT></SPAN></DIV>
<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> Monday, November 22, 2004
6:04 AM<BR><B>To:</B> millerjv@crd.ge.com;
insight-users@itk.org<BR><B>Subject:</B> Re: [Insight-users] Problem about
LevelSetMotionRegistrationFunction<BR><BR></FONT></DIV>Jim,<BR>thank you very
much.<BR><FONT color=#000000>but I don't understand , if you <BIG><SPAN
class=264435118-19112004><FONT face=Verdana size=2><BIG>want to add the
current displacement field value to the position, you could only
derive </BIG></FONT></SPAN><SPAN class=264435118-19112004><FONT face=Verdana
size=2><BIG>I1(i+u, j+v)</BIG></FONT></SPAN></BIG><SPAN
class=264435118-19112004><FONT face=Verdana size=2><BIG> rather than I1(i-u,
j-v) from here.
<BR><BR>Siwei</BIG><BR><BR></FONT></SPAN></FONT><BR><BR>Miller, James V
(Research) wrote:
<BLOCKQUOTE
cite=midD95313D68743304EA8BD26E7B44ACF8E1C5C9F@xmb04crdge.crd.ge.com
type="cite">
<META content="MSHTML 6.00.2800.1458" name=GENERATOR>
<DIV><SPAN class=264435118-19112004><FONT face=Verdana color=#0000ff
size=2>Siwei,</FONT></SPAN></DIV>
<DIV><SPAN class=264435118-19112004></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></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></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></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></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></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></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></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></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></FONT></SPAN> </DIV>
<DIV><SPAN class=264435118-19112004></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></FONT></SPAN> </DIV>
<BLOCKQUOTE>
<DIV class=OutlookMessageHeader dir=ltr align=left><FONT face=Tahoma
size=2>-----Original Message-----<BR><B>From:</B> Siwei Yang [<A
class=moz-txt-link-freetext
href="mailto:s.yang@dkfz-heidelberg.de">mailto:s.yang@dkfz-heidelberg.de</A>]<BR><B>Sent:</B>
Friday, November 19, 2004 10:48 AM<BR><B>To:</B> <A
class=moz-txt-link-abbreviated
href="mailto:insight-users@itk.org">insight-users@itk.org</A><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></BLOCKQUOTE><BR></BLOCKQUOTE></BODY></HTML>