[Insight-users] Accessing lower layers of the Image Registration method?
Luis Ibanez
luis.ibanez at kitware.com
Tue Jul 14 11:48:15 EDT 2009
Hi motes,
A) One easy way of calling a function at every iteration of the Optimizer,
Is to invoke that function from a Command/Observer.
B) Unfortunately, if you plan to make drastic changes in the registration
components, such as changing the number of nodes in a BSpline,
you will have to reset and reinitialize the registration at every
iteration.
This is because there are several arrays whose size depend on the
number of Transform parameters. These arrays will have to be resized
if you change the number of parameters in the Transform.
C) ITK is OPEN SOURCE :-)
You are empowered to take the source code of the ITK optimizer of
your choice, copy it under a different name, and at the end of every
iteration, call any function you would like.
The software doesn't impose any restrictions on you.
Note however, that you are still subject to the issue described in (B).
D) As a strategy for registration, changing the number of nodes after
*every* iteration, is a bit extreme. I would suggest that you set the
number of nodes and run a set of iterations with them (let's say
20 iterations), then you readjust the number of Nodes, and run
another set of 20 iterations,.... and so on.
In this way, the cost of reinitializing the Metric after every change
of number of Nodes is amortized across the total number of
iterations.
Regards,
Luis
----------------------------------------------------------------------
On Thu, Jul 9, 2009 at 12:19 PM, motes motes <mort.motes at gmail.com> wrote:
> I know I might have asked this before, but I have tried to be more precise
> in this post.
>
> Is it possible to write a function that gets executed in each iteration
> AFTER the call to:
>
> int start(){
> try
> {
> registration->Update();
> }
> catch( itk::ExceptionObject & err )
> {
> std::cerr << "ExceptionObject caught !" << std::endl;
> std::cerr << err << std::endl;
> return -1;
> }
> }
>
> I would like this function to maybe modify the values of the cost function
> and maybe add more control points to the B-spline grid when doing Deformable
> transformations.
>
> But is it even possible to do this after the call to update()? The only
> thing that I found that gives some feedback in each iteration is the
> different observers. How "closed for modification" is the ITK image
> registration module after the call to registration.update() with regard to
> the above details?
>
> _____________________________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.html
>
> Please keep messages on-topic and check the ITK FAQ at:
> http://www.itk.org/Wiki/ITK_FAQ
>
> Follow this link to subscribe/unsubscribe:
> http://www.itk.org/mailman/listinfo/insight-users
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.itk.org/pipermail/insight-users/attachments/20090714/6648dc3a/attachment.htm>
More information about the Insight-users
mailing list