<html><head><style type="text/css"><!-- DIV {margin:0px;} --></style></head><body><div style="font-family:arial,helvetica,sans-serif;font-size:10pt"><div>Hi,<br><br>I am also facing the same problem.<br><br>In ImageRegistration2.cxx example it is mentioned that <font size="2" color="#800000"><font size="2" color="#800000"><font color="#000000"><font size="2" color="#800000"><font size="2" color="#800000"><font size="2"><font size="2"><font size="2"><font size="2"><font color="#000000"><font size="2" color="#800000"><font size="2" color="#800000">RegularStepGradientDescentOptimizer <span style="color: rgb(0, 0, 0);">should not be used, as values are noisy. Hence I tried to use <span style="color: rgb(255, 0, 0);">AmoebaOpitimizer </span>and <span style="color: rgb(255, 0, 0);">OnePlusOneOptimizer <span style="color: rgb(0, 0, 0);">with Mattes + AffineTransform. But in both cases, I do get an exception of <br><br>Description: itk::ERROR:
 MattesMutualInformationImageToImageMetric(00F1F5F0): Too many samples map outside moving image buffer: 0 / 10000<br><br>in the first iteration of registration<br><br>I have used both <span style="color: rgb(255, 0, 0);">CenteredTransformInitializer </span>and<span style="color: rgb(255, 0, 0);"> optimizer-&gt;SetScales( optimizerScales )</span>, and the output of the warp on the initializer parameters look correct.<br><br>Can you please let me know how to overcome this problem?<br><br>Thanks,<br>Sharath Venkatesha<br><br><br></span></span></span></font></font></font></font></font></font></font></font></font></font></font></font></div><div style="font-family: arial,helvetica,sans-serif; font-size: 10pt;"><br><div style="font-family: times new roman,new york,times,serif; font-size: 12pt;"><font size="2" face="Tahoma"><hr size="1"><b><span style="font-weight: bold;">From:</span></b> Manuel David Tabas Calle &lt;manueldavid.tabas@hotmail.es&gt;<br><b><span
 style="font-weight: bold;">To:</span></b> ITK &lt;insight-users@itk.org&gt;<br><b><span style="font-weight: bold;">Sent:</span></b> Wednesday, June 24, 2009 4:21:40 AM<br><b><span style="font-weight: bold;">Subject:</span></b> [Insight-users] Affine+Mattes 2D registration problem<br></font><br>


<style>
.hmmessage P
{
margin:0px;padding:0px;}
body.hmmessage
{
font-size:10pt;font-family:Verdana;}
</style>

Hi!<br>
&nbsp;<br>
I have a problem using an Affine transform with Mattes Mutual metric. <br>
&nbsp;<br>
When I used an Affine transform, with <font size="2" color="#800000"><font size="2" color="#800000">MeanSquaresImageToImageMetric, <font color="#000000">my registration works perfectly, but it is really slow because my images are big (it last&nbsp;for 45 minutes). My images are between 2000x2000 and 4000x4000 pixels, with spacig of (1,1,1). </font></font></font><br>
<font size="2" color="#800000"><font size="2" color="#800000"><font color="#000000"></font></font></font>&nbsp;<br>
<font size="2" color="#800000"><font size="2" color="#800000"><font color="#000000">So i decided to use <font size="2" color="#800000"><font size="2" color="#800000">MattesMutualInformationImageToImageMetric<font color="#000000">, that is a faster metric. But the results are not good.</font></font></font></font></font></font><br>
<font size="2" color="#800000"><font size="2" color="#800000"><font color="#000000"><font size="2" color="#800000"><font size="2" color="#800000"><font color="#000000"></font></font></font></font></font></font>&nbsp;<br>
<font size="2" color="#800000"><font size="2" color="#800000"><font color="#000000"><font size="2" color="#800000"><font size="2" color="#800000"><font color="#000000"></font></font></font></font></font></font>&nbsp;<br>
<font size="2" color="#800000"><font size="2" color="#800000"><font color="#000000"><font size="2" color="#800000"><font size="2" color="#800000"><font color="#000000">In both, I used the followin parameters:</font></font></font></font></font></font><br>
<font size="2" color="#800000"><font size="2" color="#800000"><font color="#000000"><font size="2" color="#800000"><font size="2" color="#800000"><font color="#000000"></font></font></font></font></font></font>&nbsp;<br><font size="2" color="#800000"><font size="2" color="#800000"><font color="#000000"><font size="2" color="#800000"><font size="2" color="#800000"><font size="2">
optimizerScales[0] = 1.0;<br>
optimizerScales[1] = 1.0;<br>
optimizerScales[2] = 1.0;<br>
optimizerScales[3] = 1.0;<br>
optimizerScales[4] = 1.0/1000.0;<br>
</font><font size="2">optimizerScales[5] = 1.0/1000.0;</font><br>
&nbsp;<br><font size="2"><font size="2">
steplength = 0.1<br>
&nbsp;<br><font size="2">
maxNumberOfIterations = 300;<br>
&nbsp;<br>
minimumStepLength = 0.0001;<br>
&nbsp;<br>
<font color="#000000">and </font><br>
<font color="#000000"></font><font size="2">&nbsp;<br>
optimizer-&gt;MinimizeOn();<br>
&nbsp;<br>
<font color="#000000">For the Mattes Mutual metric, I tried a lot of combinations of histogram bins and spatial samples, starting with 50 bins and a 20% of the pixels as spatial samples. But no matter what i try, the results are not good.</font><br>
<font color="#000000"></font>&nbsp;<br>
<font color="#000000">In both programs, i use <font size="2" color="#800000"><font size="2" color="#800000">LinearInterpolateImageFunction <font color="#000000">and</font> </font></font><font size="2" color="#800000"><font size="2" color="#800000">RegularStepGradientDescentOptimizer.</font></font></font><br>
<font color="#000000"><font size="2" color="#800000"><font size="2" color="#800000"></font></font></font>&nbsp;<br>
<font color="#000000"><font size="2" color="#800000"><font size="2" color="#800000"><font color="#000000">How can I tune the parameters of the program with MattesMutual to obtain the same results???</font></font></font></font><br>
<font color="#000000"><font size="2" color="#800000"><font size="2" color="#800000"><font color="#000000"></font></font></font></font>&nbsp;<br>
<font color="#000000"><font size="2" color="#800000"><font size="2" color="#800000"><font color="#000000">Thank you all!!!</font><br></font></font></font></font></font></font></font></font></font></font></font></font><br><hr>Charlas más divertidas con el nuevo <a rel="nofollow" target="_blank" href="http://download.live.com">Windows Live Messenger</a></div></div></div><br>

      </body></html>