[Insight-users] MRIBiasCorrector

Luis Ibanez luis.ibanez at kitware.com
Mon Jan 21 12:09:09 EST 2008


Hi Xavier,

I assume that you are referring to the

   itkMRIBiasFiedlCorrectionFilter

and as "p vectors" you are referring to the coefficients
of the Legendre polynomial that is used as a field correction.


is that right ?


If so,

What you may want to do is to add an itkCommand to this
class and set it to observer the optimizer that is created
in the method

              EstimateBiasField()

in lines 644-766.

The observer must be connected to the optimizer before line 741,
because that is where the optimizer starts its iterations:

            optimizer->StartOptimization()


You will find examples on how to use itkCommands (as observers)
in the ITK Software Guide

        http://www.itk.org/ItkSoftwareGuide.pdf

in particular in the "Image Registration" chapter.

Note that the difference is that in this case you will use
the itkCommand as an object constructed *inside* the filter
instead of an object constructed outside.


    Regards,


        Luis


------------------
Xavier Penya wrote:
> Hi all,
> 
> I am working with this ITK feature, and I would like to take out the so 
> called "p vectors" for each one of the iterations (and not just the 
> final one, as usual) in order to control the correction process. I would 
> like to find out where I have to change the code.
> 
> Thank you very much,
> 
>        Xavier
> 
> 
> ------------------------------------------------------------------------
> 
> _______________________________________________
> Insight-users mailing list
> Insight-users at itk.org
> http://www.itk.org/mailman/listinfo/insight-users


More information about the Insight-users mailing list