<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<HTML>
<HEAD><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>
</HEAD>
<BODY bgProperties="fixed" bgcolor="#FFFFFF" background="http://flashimg.club-internet.fr/flashmail/Skins/Vacance2/vide.gif">
<br>
<br>
Hi Karthik,<br>
<br>
Thanks for your answer, that's exactly what I was looking for.<br>
I redirected the standard flow to a text file, so I can now look for
the parameter's evolution and know when algorithm reaches stable level.<br>
That's great!<br>
<br>
Just a last question:<br>
In another project, I test the MultiResImageRegistration1.cxx<br>
I modified it:<br>
-To register 3D volumes (I just change the <i>dimension</i> variable to 3)<br>
-MutualInformationImageToImageMetric instead of MattesMutual...<br>
-QuaternionRigidTransform instead of TranslationTransform <br>
-QuaternionRigidTransformGradientDescentOptimizer instead of RegularStepGradientDescentOptimizer<br>
-Add observer to control the evolution<br>
I wonder if this example can work on volumes. After some iterations, I got an itkexception.<br>
<br>
Description: itk::ERROR: MutualInformationImageToImageMetric(012DAED8): All the<br>
sampled point mapped to outside of the moving image.<br>
<br>
Algorithme diverges!<br>
With some parameters, I manage to finish the registration but the
resulting volume is black (!?) and parameters don't evolveafter 3/4
iterations.<br>
<br>
If you see something wrong, tell me!<br>
<br>
Thanks.<br>
<br>
Laurent.<br>
<br>
<br>
<br>
----Message d'origine----<br>
Date: Wed, 13 Apr 2005 15:51:56 -0400<br>De: Karthik Krishnan <karthik.krishnan @kitware.com=""><br>A: laurent.paul@club-internet.fr<br>Copie à: insight-users@itk.org<br>Sujet: Re: [Insight-users] MultiResMIRegistration control<br><br>
Laurent,<br>
<br>
1. you should <br>
optimizer->AddObserver( itk::IterationEvent()<br>
rather than add it to the registration method, <br>
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->GetCurrentPosition() will give you the parameters at
the current position and this is what you want to print out.<br>
<br>
3. The registration->GetTransform() is only a pointer. You should
have had<br>
std::cout << registration->GetTransform()->GetParamters()
<< 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:
</karthik.krishnan><blockquote cite="midmnet1.1113400261.12872.laurent.paul@club-internet.fr" type="cite">
<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 << "trans:" <<
registrator->GetTransformParameters() << 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>