[Insight-users] MultiResMIRegistration control

Karthik Krishnan Karthik.Krishnan at kitware.com
Wed Apr 13 15:51:56 EDT 2005


Laurent,

1. you should
    optimizer->AddObserver( itk::IterationEvent()
rather than add it to the registration method,
    m_Registration.

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.

2. m_Optimizer->GetCurrentPosition() will give you the parameters at the 
current position and this is what you want to print out.

3. The registration->GetTransform() is only a pointer. You should have had
std::cout << registration->GetTransform()->GetParamters() << std::endl;

Please take a look at Examples/Registration/MultiResImageRegistration1.cxx

Thanks
Regards
Karthik




laurent.paul at club-internet.fr wrote:

>
> Hi users,
>
> Few times ago, I tried to register two volumes coming from PET, CT 
> scan and MRI.
> Thanks to your helpful advices, I managed!.
> 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.
> 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.
> At the end of the application, final parameters are displayed. So, I 
> tried to "copy" and use that line:
> /std::cout << "trans:" << registrator->GetTransformParameters() << 
> std::endl;
>
> /At compilation time,/ /I got an error, the compiler doesn't know the 
> GetTransformParameters Method. I tried with GetTransform but it 
> displays "00000000"!
>
> Where can I get the parameters, from the optimizer or from the 
> registrator?
> Which method permits to do this?
>
> Thanks for your help.
>
> Laurent.
>
>------------------------------------------------------------------------
>
>_______________________________________________
>Insight-users mailing list
>Insight-users at itk.org
>http://www.itk.org/mailman/listinfo/insight-users
>  
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://public.kitware.com/pipermail/insight-users/attachments/20050413/787027ab/attachment.htm


More information about the Insight-users mailing list