[Insight-developers] RE: Demons voodoo

Miller, James V (Research) millerjv at crd.ge.com
Fri, 9 Apr 2004 11:14:48 -0400


This message is in MIME format. Since your mail reader does not understand
this format, some or all of this message may not be legible.

------_=_NextPart_001_01C41E45.07252156
Content-Type: text/plain

Lydia, 
 
I checked in my changes to the DemonsRegistrationFunction on the branch
PDE-Registration.  The files affected are
 
Code/Algorithms/itkDemonsRegistrationFunction.h
Code/Algorithms/itkDemonsRegistrationFunction.txx
Code/Algorithms/itkPDEDeformableRegistrationFilter.txx
Examples/Registration/DeformableRegistration2.cxx
 
You can test this version on your data and see what impact it has on your
results.
 
Jim
-----Original Message-----
From: Miller, James V (Research) [mailto:millerjv at crd.ge.com]
Sent: Friday, April 09, 2004 9:58 AM
To: 'Insight-developers (E-mail)'
Subject: [Insight-developers] RE: Demons voodoo


Lydia, 
 
I can use the WarpImageFilter as is. Though I am thinking of writing a
filter that will approximate the inverse of a deformation.  There are some
one-to-many/many-to-one issues but we could handle them via an
approximation.
 
I am going to "try" to create a branch where I can checkin my changes. This
way you can try them on your data and see if you like the results at all.
I'll put my test images in Testing/Data/Input.
 
In thinking about this more, how about this plan of attack.  Why don't you
come up with the definition of "forward mapping" and "reverse mapping" given
a fixed and moving image. You have been thinking about this longer than I
have, so we'll start with whatever definition you come up with.  
 
We'll then document in each of these filters whether they calculate a
forward or reverse mapping.  I think we can put a protected flag in the
PDEDeformableRegistrationFilter such that subclasses can indicate to the
PDEDeformableRegistrationFilter whether they calculate a forward or reverse
mapping. The PDEDeformableRegistrationFilter can then implement the pipeline
calls using meta-information from the moving or fixed image, whichever is
appropriate. If we can write routines that can produce either a forward or
reverse mapping, then we'll expose the flag to the user.  
 
There are some other things I'd like to change with the Demons algorithms.
For instance, I would like to add a mode to precompute gradients and
gradient magnitudes of the fixed image so that I can trade off memory for
speed. But I am going to hold off on this until we decide how to handle the
forward/reverse mapping.
 
I have some other tests I want to run ferret out the differences in the
forward/reverse approaches.  I think there may a difference in how the low
end of the intensity range is manipulated.
 
Jim
-----Original Message-----
From: Lydia Ng [mailto:lng at insightful.com]
Sent: Thursday, April 08, 2004 8:09 PM
To: Miller, James V (Research); Insight-developers (E-mail)
Subject: RE: Demons voodoo


Jim,
 
Are you able to use the WarpImageFilter as it? Or do you have to modify it
to?
 
Also, have you seen http://www.inria.fr/rrrt/rr-3706.html
<http://www.inria.fr/rrrt/rr-3706.html> ? 
 
BTW: Could you send me your test code and the toy images? I am wondering if
the current implementation uses moving image derivative instead of the fixed
image that the behavior may be to same as to your suggested changes.

 
-Lydia

------_=_NextPart_001_01C41E45.07252156
Content-Type: text/html
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML xmlns=3D"http://www.w3.org/TR/REC-html40" xmlns:o =3D=20
"urn:schemas-microsoft-com:office:office" xmlns:w =3D=20
"urn:schemas-microsoft-com:office:word" xmlns:st1 =3D=20
"urn:schemas-microsoft-com:office:smarttags"><HEAD>
<META HTTP-EQUIV=3D"Content-Type" CONTENT=3D"text/html; =
charset=3Dus-ascii">


<META content=3DWord.Document name=3DProgId>
<META content=3D"MSHTML 6.00.2800.1276" name=3DGENERATOR>
<META content=3D"Microsoft Word 10" name=3DOriginator><LINK=20
href=3D"cid:filelist.xml at 01C41D8C.3D9AD240" =
rel=3DFile-List><o:SmartTagType=20
namespaceuri=3D"urn:schemas-microsoft-com:office:smarttags"=20
name=3D"country-region"></o:SmartTagType><o:SmartTagType=20
namespaceuri=3D"urn:schemas-microsoft-com:office:smarttags"=20
name=3D"place"></o:SmartTagType><o:SmartTagType=20
namespaceuri=3D"urn:schemas-microsoft-com:office:smarttags"=20
name=3D"time"></o:SmartTagType><o:SmartTagType=20
namespaceuri=3D"urn:schemas-microsoft-com:office:smarttags"=20
name=3D"date"></o:SmartTagType><!--[if gte mso 9]><xml>
 <o:OfficeDocumentSettings>
  <o:DoNotRelyOnCSS/>
 </o:OfficeDocumentSettings>
</xml><![endif]--><!--[if gte mso 9]><xml>
 <w:WordDocument>
  <w:DocumentKind>DocumentEmail</w:DocumentKind>
  <w:EnvelopeVis/>
  <w:BrowserLevel>MicrosoftInternetExplorer4</w:BrowserLevel>
 </w:WordDocument>
</xml><![endif]--><!--[if !mso]>
<STYLE>st1\:* {
	BEHAVIOR: url(#default#ieooui)
}
</STYLE>
<![endif]-->
<STYLE> at font-face {
	font-family: Tahoma;
}
 at font-face {
	font-family: Comic Sans MS;
}
 at page Section1 {size: 8.5in 11.0in; margin: 1.0in 1.25in 1.0in 1.25in; =
mso-header-margin: .5in; mso-footer-margin: .5in; mso-paper-source: 0; =
}
P.MsoNormal {
	FONT-SIZE: 12pt; MARGIN: 0in 0in 0pt; FONT-FAMILY: "Times New Roman"; =
mso-style-parent: ""; mso-pagination: widow-orphan; =
mso-fareast-font-family: "Times New Roman"
}
LI.MsoNormal {
	FONT-SIZE: 12pt; MARGIN: 0in 0in 0pt; FONT-FAMILY: "Times New Roman"; =
mso-style-parent: ""; mso-pagination: widow-orphan; =
mso-fareast-font-family: "Times New Roman"
}
DIV.MsoNormal {
	FONT-SIZE: 12pt; MARGIN: 0in 0in 0pt; FONT-FAMILY: "Times New Roman"; =
mso-style-parent: ""; mso-pagination: widow-orphan; =
mso-fareast-font-family: "Times New Roman"
}
A:link {
	COLOR: blue; TEXT-DECORATION: underline; text-underline: single
}
SPAN.MsoHyperlink {
	COLOR: blue; TEXT-DECORATION: underline; text-underline: single
}
A:visited {
	COLOR: blue; TEXT-DECORATION: underline; text-underline: single
}
SPAN.MsoHyperlinkFollowed {
	COLOR: blue; TEXT-DECORATION: underline; text-underline: single
}
P {
	FONT-SIZE: 12pt; MARGIN-LEFT: 0in; MARGIN-RIGHT: 0in; FONT-FAMILY: =
"Times New Roman"; mso-pagination: widow-orphan; =
mso-fareast-font-family: "Times New Roman"; mso-margin-top-alt: auto; =
mso-margin-bottom-alt: auto
}
SPAN.EmailStyle18 {
	COLOR: navy; FONT-FAMILY: Arial; mso-style-type: personal; =
mso-style-noshow: yes; mso-ansi-font-size: 10.0pt; mso-bidi-font-size: =
10.0pt; mso-ascii-font-family: Arial; mso-hansi-font-family: Arial; =
mso-bidi-font-family: Arial
}
SPAN.EmailStyle21 {
	COLOR: navy; FONT-FAMILY: Arial; mso-style-type: personal-reply; =
mso-style-noshow: yes; mso-ansi-font-size: 10.0pt; mso-bidi-font-size: =
10.0pt; mso-ascii-font-family: Arial; mso-hansi-font-family: Arial; =
mso-bidi-font-family: Arial
}
DIV.Section1 {
	page: Section1
}
</STYLE>
<!--[if gte mso 10]>
<style>
 /* Style Definitions */=20
 table.MsoNormalTable
	{mso-style-name:"Table Normal";
	mso-tstyle-rowband-size:0;
	mso-tstyle-colband-size:0;
	mso-style-noshow:yes;
	mso-style-parent:"";
	mso-padding-alt:0in 5.4pt 0in 5.4pt;
	mso-para-margin:0in;
	mso-para-margin-bottom:.0001pt;
	mso-pagination:widow-orphan;
	font-size:10.0pt;
	font-family:"Times New Roman";}
</style>
<![endif]--></HEAD>
<BODY lang=3DEN-US style=3D"tab-interval: .5in" vLink=3Dblue =
link=3Dblue>
<DIV><SPAN class=3D464091215-09042004><FONT color=3D#0000ff =
size=3D2>Lydia,=20
</FONT></SPAN></DIV>
<DIV><SPAN class=3D464091215-09042004><FONT color=3D#0000ff=20
size=3D2></FONT></SPAN>&nbsp;</DIV>
<DIV><SPAN class=3D464091215-09042004><FONT color=3D#0000ff size=3D2>I =
checked in my=20
changes to the DemonsRegistrationFunction on the branch =
PDE-Registration.&nbsp;=20
The files affected are</FONT></SPAN></DIV>
<DIV><SPAN class=3D464091215-09042004><FONT color=3D#0000ff=20
size=3D2></FONT></SPAN>&nbsp;</DIV>
<DIV><SPAN class=3D464091215-09042004><FONT color=3D#0000ff=20
size=3D2>Code/Algorithms/itkDemonsRegistrationFunction.h</FONT></SPAN></=
DIV>
<DIV><SPAN class=3D464091215-09042004><FONT color=3D#0000ff=20
size=3D2>Code/Algorithms/itkDemonsRegistrationFunction.txx</FONT></SPAN>=
</DIV>
<DIV><SPAN class=3D464091215-09042004><FONT color=3D#0000ff=20
size=3D2>Code/Algorithms/itkPDEDeformableRegistrationFilter.txx</FONT></=
SPAN></DIV>
<DIV><SPAN class=3D464091215-09042004><FONT color=3D#0000ff=20
size=3D2>Examples/Registration/DeformableRegistration2.cxx</FONT></SPAN>=
</DIV>
<DIV><SPAN class=3D464091215-09042004><FONT color=3D#0000ff=20
size=3D2></FONT></SPAN>&nbsp;</DIV>
<DIV><SPAN class=3D464091215-09042004><FONT color=3D#0000ff =
size=3D2>You can test this=20
version on your data and see what impact it has on your=20
results.</FONT></SPAN></DIV>
<DIV><SPAN class=3D464091215-09042004><FONT color=3D#0000ff=20
size=3D2></FONT></SPAN>&nbsp;</DIV>
<DIV><SPAN class=3D464091215-09042004><FONT color=3D#0000ff=20
size=3D2>Jim</FONT></SPAN></DIV>
<BLOCKQUOTE dir=3Dltr style=3D"MARGIN-RIGHT: 0px">
  <DIV class=3DOutlookMessageHeader dir=3Dltr align=3Dleft><FONT =
face=3DTahoma=20
  size=3D2>-----Original Message-----<BR><B>From:</B> Miller, James V =
(Research)=20
  [mailto:millerjv at crd.ge.com]<BR><B>Sent:</B> Friday, April 09, 2004 =
9:58=20
  AM<BR><B>To:</B> 'Insight-developers (E-mail)'<BR><B>Subject:</B>=20
  [Insight-developers] RE: Demons voodoo<BR><BR></FONT></DIV>
  <DIV><SPAN class=3D884011113-09042004><FONT color=3D#0000ff =
size=3D2>Lydia,=20
  </FONT></SPAN></DIV>
  <DIV><SPAN class=3D884011113-09042004><FONT color=3D#0000ff=20
  size=3D2></FONT></SPAN>&nbsp;</DIV>
  <DIV><SPAN class=3D884011113-09042004><FONT color=3D#0000ff =
size=3D2>I can use the=20
  WarpImageFilter as is. Though I am thinking of writing a filter that =
will=20
  approximate the inverse of a deformation.&nbsp; There are some=20
  one-to-many/many-to-one issues but we could handle them via an=20
  approximation.</FONT></SPAN></DIV>
  <DIV><SPAN class=3D884011113-09042004><FONT color=3D#0000ff=20
  size=3D2></FONT></SPAN>&nbsp;</DIV>
  <DIV><SPAN class=3D884011113-09042004><FONT color=3D#0000ff =
size=3D2>I am going to=20
  "try" to create a branch where I can checkin my changes.&nbsp;This =
way you can=20
  try them on your data and see&nbsp;if&nbsp;you like the results at=20
  all.&nbsp;I'll put my test images in =
Testing/Data/Input.</FONT></SPAN></DIV>
  <DIV><SPAN class=3D884011113-09042004><FONT color=3D#0000ff=20
  size=3D2></FONT></SPAN>&nbsp;</DIV>
  <DIV><SPAN class=3D884011113-09042004><FONT color=3D#0000ff =
size=3D2>In thinking=20
  about this more, how about this plan of attack.&nbsp; Why don't you =
come up=20
  with the definition of "forward mapping" and "reverse mapping" given =
a fixed=20
  and moving image. You have been thinking about this longer than I =
have, so=20
  we'll start with whatever definition you come up with.&nbsp;=20
  </FONT></SPAN></DIV>
  <DIV><SPAN class=3D884011113-09042004><FONT color=3D#0000ff=20
  size=3D2></FONT></SPAN>&nbsp;</DIV>
  <DIV><SPAN class=3D884011113-09042004><FONT color=3D#0000ff =
size=3D2>We'll then=20
  document in each of these filters whether they calculate a forward or =
reverse=20
  mapping.&nbsp; I think we can put a protected flag in the=20
  PDEDeformableRegistrationFilter such that subclasses can indicate to =
the=20
  PDEDeformableRegistrationFilter whether they calculate a forward or =
reverse=20
  mapping. The PDEDeformableRegistrationFilter can then implement the =
pipeline=20
  calls using meta-information from the moving or fixed image, =
whichever is=20
  appropriate. If we can write routines that can produce either a =
forward or 
  reverse mapping, then we'll expose the flag to the user.&nbsp;=20
  </FONT></SPAN></DIV>
  <DIV><SPAN class=3D884011113-09042004><FONT color=3D#0000ff=20
  size=3D2></FONT></SPAN>&nbsp;</DIV>
  <DIV><SPAN class=3D884011113-09042004><FONT color=3D#0000ff =
size=3D2>There are some=20
  other things I'd like to change with the Demons algorithms.&nbsp; For =

  instance, I would like to add a mode to precompute gradients and =
gradient=20
  magnitudes of the fixed image so that I can trade off memory for =
speed. But I=20
  am going to hold off on this until we decide how to handle the =
forward/reverse=20
  mapping.</FONT></SPAN></DIV>
  <DIV><SPAN class=3D884011113-09042004><FONT color=3D#0000ff=20
  size=3D2></FONT></SPAN>&nbsp;</DIV>
  <DIV><SPAN class=3D884011113-09042004><FONT color=3D#0000ff =
size=3D2>I have some=20
  other tests I want to run ferret out the differences in the =
forward/reverse=20
  approaches.&nbsp; I think there may a difference in how the low end =
of the=20
  intensity range is manipulated.</FONT></SPAN></DIV>
  <DIV><SPAN class=3D884011113-09042004><FONT color=3D#0000ff=20
  size=3D2></FONT></SPAN>&nbsp;</DIV>
  <DIV><SPAN class=3D884011113-09042004><FONT color=3D#0000ff=20
  size=3D2>Jim</FONT></SPAN></DIV>
  <BLOCKQUOTE dir=3Dltr style=3D"MARGIN-RIGHT: 0px">
    <DIV class=3DOutlookMessageHeader dir=3Dltr align=3Dleft><FONT =
face=3DTahoma=20
    size=3D2>-----Original Message-----<BR><B>From:</B> Lydia Ng=20
    [mailto:lng at insightful.com]<BR><B>Sent:</B> Thursday, April 08, =
2004 8:09=20
    PM<BR><B>To:</B> Miller, James V (Research); Insight-developers=20
    (E-mail)<BR><B>Subject:</B> RE: Demons voodoo<BR><BR></FONT></DIV>
    <DIV class=3DSection1>
    <P class=3DMsoNormal><FONT face=3DArial color=3Dnavy size=3D2><SPAN =

    style=3D"FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: =
Arial">Jim,<o:p></o:p></SPAN></FONT></P>
    <P class=3DMsoNormal><FONT face=3DArial color=3Dnavy size=3D2><SPAN =

    style=3D"FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: =
Arial"><o:p>&nbsp;</o:p></SPAN></FONT></P>
    <P class=3DMsoNormal><FONT face=3DArial color=3Dnavy size=3D2><SPAN =

    style=3D"FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial">Are you =
able to use=20
    the WarpImageFilter as it? Or do you have to modify it=20
    to?<o:p></o:p></SPAN></FONT></P>
    <P class=3DMsoNormal><FONT face=3DArial color=3Dnavy size=3D2><SPAN =

    style=3D"FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: =
Arial"><o:p>&nbsp;</o:p></SPAN></FONT></P>
    <P class=3DMsoNormal><FONT face=3DArial color=3Dnavy size=3D2><SPAN =

    style=3D"FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial">Also, =
have you seen=20
    <A=20
    =
href=3D"http://www.inria.fr/rrrt/rr-3706.html">http://www.inria.fr/rrrt/=
rr-3706.html</A>?=20
    <o:p></o:p></SPAN></FONT></P>
    <P class=3DMsoNormal><FONT face=3DArial color=3Dnavy size=3D2><SPAN =

    style=3D"FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: =
Arial"><o:p>&nbsp;</o:p></SPAN></FONT></P>
    <P class=3DMsoNormal style=3D"tab-stops: 328.5pt"><FONT =
face=3DArial color=3Dnavy=20
    size=3D2><SPAN style=3D"FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: =
Arial">BTW:=20
    Could you send me your test code and the toy images? I am wondering =
if the=20
    current implementation uses moving image derivative instead of the =
fixed=20
    image that the behavior may be to same as to your suggested =
changes.<SPAN=20
    style=3D"mso-tab-count: =
1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=20
    </SPAN><o:p></o:p></SPAN></FONT></P>
    <P class=3DMsoNormal><FONT face=3DArial color=3Dnavy size=3D2><SPAN =

    style=3D"FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: =
Arial"><o:p>&nbsp;</o:p></SPAN></FONT></P>
    <P class=3DMsoNormal><FONT face=3DArial color=3Dnavy size=3D2><SPAN =

    style=3D"FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: =
Arial">-</SPAN></FONT><st1:country-region><st1:place><FONT=20
    face=3DArial color=3Dnavy size=3D2><SPAN=20
    style=3D"FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: =
Arial">Lydia</SPAN></FONT></st1:place></st1:country-region><FONT=20
    face=3DArial color=3Dnavy size=3D2><SPAN=20
    style=3D"FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: =
Arial"><o:p></o:p></SPAN></FONT></P></DIV></BLOCKQUOTE></BLOCKQUOTE></BO=
DY></HTML>

------_=_NextPart_001_01C41E45.07252156--