<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=US-ASCII">
<META NAME="Generator" CONTENT="MS Exchange Server version 5.5.2658.24">
<TITLE>RE: [Insight-users] ImageRegistration2 problem.</TITLE>
</HEAD>
<BODY>

<P><FONT SIZE=2>Luis,</FONT>
</P>

<P><FONT SIZE=2>Thank you for responding.&nbsp; However, I am still having problems.</FONT>
</P>

<P><FONT SIZE=2>I downloaded a newer version of itk using cvs.</FONT>
</P>

<P><FONT SIZE=2>Now when I run ImageRegistration2, it seems to go through 200 iterations,</FONT>
<BR><FONT SIZE=2>each with output:</FONT>
</P>

<P><FONT SIZE=2>&nbsp;2.23973e-07&nbsp; [0,0]</FONT>
</P>

<P><FONT SIZE=2>You are probably correct, that the metric seems to be computed incorrectly.&nbsp; Since the nightly tests are ok, this suggests that the problem is not with the code, but perhaps with my system.&nbsp; However, I have tried this on two different PCs.</FONT></P>

<P><FONT SIZE=2>Anyone encouter a similar problem?&nbsp; Perhaps I am missing a random number generator in Cygwin?</FONT>
</P>

<P><FONT SIZE=2>- John.</FONT>
</P>
<BR>

<P><FONT SIZE=2>-----Original Message-----</FONT>
<BR><FONT SIZE=2>From: Luis Ibanez</FONT>
<BR><FONT SIZE=2>To: Woo, John</FONT>
<BR><FONT SIZE=2>Cc: 'insight-users@itk.org'</FONT>
<BR><FONT SIZE=2>Sent: 5/17/2005 8:25 PM</FONT>
<BR><FONT SIZE=2>Subject: Re: [Insight-users] ImageRegistration2 problem.</FONT>
</P>
<BR>

<P><FONT SIZE=2>Hi John,</FONT>
</P>
<BR>

<P><FONT SIZE=2>Cygwin used has a problem for running the random number</FONT>
<BR><FONT SIZE=2>generator that is used by the Mutual Information metric.</FONT>
</P>

<P><FONT SIZE=2>This has been fixed now.</FONT>
</P>
<BR>

<P><FONT SIZE=2>The example:</FONT>
</P>

<P><FONT SIZE=2>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ImageRegistration2</FONT>
</P>

<P><FONT SIZE=2>is tested nightly</FONT>
</P>

<P><FONT SIZE=2><A HREF="http://www.itk.org/Testing/Dashboard/20050517-0500-Nightly/TestDetail/__" TARGET="_blank">http://www.itk.org/Testing/Dashboard/20050517-0500-Nightly/TestDetail/__</A></FONT>
<BR><FONT SIZE=2>Examples_Registration_ImageRegistration2Test.html</FONT>
</P>

<P><FONT SIZE=2>and it is consistently passing in all platforms.</FONT>
</P>

<P><FONT SIZE=2>The typical output that you should see is in Cygwing is:</FONT>
</P>

<P><FONT SIZE=2><A HREF="http://www.itk.org/Testing/Sites/dash14.kitware/Win32-cygwin331/20050517" TARGET="_blank">http://www.itk.org/Testing/Sites/dash14.kitware/Win32-cygwin331/20050517</A></FONT>
<BR><FONT SIZE=2>-0500-Nightly/Results/__Examples_Registration_ImageRegistration2Test.htm</FONT>
<BR><FONT SIZE=2>l</FONT>
</P>
<BR>
<BR>

<P><FONT SIZE=2>number of samples = 567</FONT>
<BR><FONT SIZE=2>0&nbsp;&nbsp; 0.291543&nbsp;&nbsp; [0.105135, 0.090224]</FONT>
<BR><FONT SIZE=2>1&nbsp;&nbsp; 0.260628&nbsp;&nbsp; [0.161649, 0.157256]</FONT>
<BR><FONT SIZE=2>2&nbsp;&nbsp; 0.270509&nbsp;&nbsp; [0.320506, 0.209221]</FONT>
<BR><FONT SIZE=2>3&nbsp;&nbsp; 0.316618&nbsp;&nbsp; [0.422436, 0.283459]</FONT>
</P>

<P><FONT SIZE=2>...</FONT>
</P>

<P><FONT SIZE=2>198&nbsp;&nbsp; 0.607511&nbsp;&nbsp; [12.9989, 16.8214]</FONT>
<BR><FONT SIZE=2>199&nbsp;&nbsp; 0.603641&nbsp;&nbsp; [13.0552, 16.9111]</FONT>
<BR><FONT SIZE=2>Result =</FONT>
<BR><FONT SIZE=2>&nbsp; Translation X = 13.0552</FONT>
<BR><FONT SIZE=2>&nbsp; Translation Y = 16.9111</FONT>
<BR><FONT SIZE=2>&nbsp; Iterations&nbsp;&nbsp;&nbsp; = 200</FONT>
<BR><FONT SIZE=2>&nbsp; Metric value&nbsp; = 0.603641</FONT>
</P>
<BR>
<BR>
<BR>
<BR>

<P><FONT SIZE=2>You should probably update your version</FONT>
<BR><FONT SIZE=2>of ITK in order to&nbsp; use CVS.</FONT>
</P>
<BR>
<BR>

<P><FONT SIZE=2>Regards,</FONT>
</P>
<BR>
<BR>

<P><FONT SIZE=2>&nbsp;&nbsp;&nbsp; Luis</FONT>
</P>
<BR>
<BR>

<P><FONT SIZE=2>------------------------------------------------------------------</FONT>
<BR><FONT SIZE=2>Woo, John wrote:</FONT>
</P>

<P><FONT SIZE=2>&gt; Hi, I'm a new user to ITK.</FONT>
<BR><FONT SIZE=2>&gt; </FONT>
<BR><FONT SIZE=2>&gt; I have succeeded in running ImageRegistration1 and ImageRegistration3 </FONT>
<BR><FONT SIZE=2>&gt; with their respective Example data.</FONT>
<BR><FONT SIZE=2>&gt; </FONT>
<BR><FONT SIZE=2>&gt; However, I cannot seem to run ImageRegistration2 (MI Registration) </FONT>
<BR><FONT SIZE=2>&gt; correctly with BrainT1SliceBorder20.png and </FONT>
<BR><FONT SIZE=2>&gt; BrainProtonDensitySliceShifted13x17y.png.</FONT>
<BR><FONT SIZE=2>&gt; </FONT>
<BR><FONT SIZE=2>&gt; It seems to compile ok.&nbsp; However, when running, it seems to give a </FONT>
<BR><FONT SIZE=2>&gt; Result of</FONT>
<BR><FONT SIZE=2>&gt; </FONT>
<BR><FONT SIZE=2>&gt; Result =</FONT>
<BR><FONT SIZE=2>&gt;&nbsp; Translation X = 0</FONT>
<BR><FONT SIZE=2>&gt;&nbsp; Translation Y = 0</FONT>
<BR><FONT SIZE=2>&gt;&nbsp; Iterations&nbsp;&nbsp;&nbsp; = 200</FONT>
<BR><FONT SIZE=2>&gt;&nbsp; Metric value&nbsp; = 2.5398e-06.</FONT>
<BR><FONT SIZE=2>&gt; </FONT>
<BR><FONT SIZE=2>&gt; It seems that all 200 iterations have values of</FONT>
<BR><FONT SIZE=2>&gt;&nbsp; 2.5398e-06&nbsp;&nbsp;&nbsp; [0, 0]</FONT>
<BR><FONT SIZE=2>&gt; </FONT>
<BR><FONT SIZE=2>&gt; Am I doing something incorrectly?&nbsp; I am running ITK on Cygwin on a </FONT>
<BR><FONT SIZE=2>&gt; Windows platform.</FONT>
<BR><FONT SIZE=2>&gt; </FONT>
<BR><FONT SIZE=2>&gt; - John.</FONT>
<BR><FONT SIZE=2>&gt; </FONT>
<BR><FONT SIZE=2>&gt; </FONT>
<BR><FONT SIZE=2>&gt;</FONT>
<BR><FONT SIZE=2>------------------------------------------------------------------------</FONT>
<BR><FONT SIZE=2>&gt; </FONT>
<BR><FONT SIZE=2>&gt; _______________________________________________</FONT>
<BR><FONT SIZE=2>&gt; Insight-users mailing list</FONT>
<BR><FONT SIZE=2>&gt; Insight-users@itk.org</FONT>
<BR><FONT SIZE=2>&gt; <A HREF="http://www.itk.org/mailman/listinfo/insight-users" TARGET="_blank">http://www.itk.org/mailman/listinfo/insight-users</A></FONT>
</P>
<BR>

</BODY>
</HTML>