<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
  <meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
  <title></title>
</head>
<body bgcolor="#ffffff" text="#000000">
Laurent,<br>
<br>
1. you should <br>
&nbsp;&nbsp;&nbsp; optimizer-&gt;AddObserver( itk::IterationEvent()<br>
rather than add it to the registration method, <br>
&nbsp;&nbsp;&nbsp; m_Registration.<br>
<br>
The reason being that MultiResolutionRegistrationMethod invokes an
iteration event before each resolution level and what you want to do is
invoke an event at each iteration. <br>
<br>
2. m_Optimizer-&gt;GetCurrentPosition() will give you the parameters at
the current position and this is what you want to print out.<br>
<br>
3. The registration-&gt;GetTransform() is only a pointer. You should
have had<br>
std::cout &lt;&lt; registration-&gt;GetTransform()-&gt;GetParamters()
&lt;&lt; std::endl;<br>
<br>
Please take a look at
Examples/Registration/MultiResImageRegistration1.cxx<br>
<br>
Thanks<br>
Regards<br>
Karthik<br>
<br>
<br>
<br>
<br>
<a class="moz-txt-link-abbreviated" href="mailto:laurent.paul@club-internet.fr">laurent.paul@club-internet.fr</a> wrote:
<blockquote
 cite="midmnet1.1113400261.12872.laurent.paul@club-internet.fr"
 type="cite">
  <title></title>
  <style>
body, table, tr, td, p {font-family: Verdana;font-size:12px;margin: 0px 0px 0px 0px}
.bgtabl {BACKGROUND-REPEAT: no-repeat}
  </style>
  <br>
Hi users,<br>
  <br>
Few times ago, I tried to register two volumes coming from PET, CT scan
and MRI.<br>
Thanks to your helpful advices, I managed!.<br>
I use the MultiResMIRegistration application from insightApplications.
I'd like to modify this application to control the evolution of the
algorithm. So I add an observer on IterationEvent. That works.<br>
I'd want to display parameters at each iteration (or each 100
iterations, that isn't the problem) but I don't manage to get the
parameters.<br>
At the end of the application, final parameters are displayed. So, I
tried to "copy" and use that line:<br>
  <i>std::cout &lt;&lt; "trans:" &lt;&lt;
registrator-&gt;GetTransformParameters() &lt;&lt; std::endl;<br>
  <br>
  </i>At compilation time,<i> </i>I got an error, the compiler doesn't
know the GetTransformParameters Method. I tried with GetTransform but
it displays "00000000"!<br>
  <br>
Where can I get the parameters, from the optimizer or from the
registrator?<br>
Which method permits to do this?<br>
  <br>
Thanks for your help.<br>
  <br>
Laurent.<br>
  <br>
  <pre wrap="">
<hr size="4" width="90%">
_______________________________________________
Insight-users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:Insight-users@itk.org">Insight-users@itk.org</a>
<a class="moz-txt-link-freetext" href="http://www.itk.org/mailman/listinfo/insight-users">http://www.itk.org/mailman/listinfo/insight-users</a>
  </pre>
</blockquote>
<br>
</body>
</html>