[Insight-users] help with MultiResImageRegistration2.cxx Example

Julien Jomier jjomier at cs.unc.edu
Mon Aug 2 17:03:03 EDT 2004


Hi Huss,

The number of parameters for the affine transformation is now 12 (instead of
6 for 2D)
You should have the scales as follow:

optimizerScales[0] = 1.0; // scale for M11
optimizerScales[1] = 1.0; // scale for M12
optimizerScales[2] = 1.0; // scale for M13
optimizerScales[3] = 1.0; // scale for M21
optimizerScales[4] = 1.0; // scale for M22
optimizerScales[5] = 1.0; // scale for M23
optimizerScales[6] = 1.0; // scale for M31
optimizerScales[7] = 1.0; // scale for M32
optimizerScales[8] = 1.0; // scale for M33

optimizerScales[9] = 1.0 / 1000000.0; // scale for translation on X
optimizerScales[10] = 1.0 / 1000000.0; // scale for translation on Y
optimizerScales[11] = 1.0 / 1000000.0; // scale for translation on Z

You also need to change the access to the finalParameters:
  
double TranslationAlongX = finalParameters[9];
double TranslationAlongY = finalParameters[10];
double TranslationAlongZ = finalParameters[11];


>  Also, is the initial value of 1.0 a good value??
During the optimization each parameter is divied by the corresponding scale.
Therefore, in this example the translation will be dominant by a factor
1000000.0.
The tuning of the parameter's scales is really application dependent.

best regards,

Julien

> -----Original Message-----
> From: Huss [mailto:hussaintameem at gmail.com] 
> Sent: Monday, August 02, 2004 4:33 PM
> To: Julien Jomier
> Subject: Re: [Insight-users] help with 
> MultiResImageRegistration2.cxx Example
> 
> 
> Hi Julien,
> 
> thanks a lot for writing back. It changed the Dimension in the main
> function as you said.
> As for the OptimizerScales part I just added:
>   optimizerScales[6] = 1.0; 
>   optimizerScales[7] = 1.0; 
>   optimizerScales[8] = 1.0; 
> 
>   Is this is okay or I need to change something else??
>  Also, is the initial value of 1.0 a good value??
> 
> Thanks for your help again
> 
> Huss
> 
> 
> On Mon, 2 Aug 2004 16:16:07 -0400, Julien Jomier 
> <jjomier at cs.unc.edu> wrote:
> > Hi Huss,
> > 
> > MultiResImageRegistration2.cxx is supposed to work on 
> 2-dimensional images.
> > 
> > you can change the Dimension in the main() function:
> > 
> >  const    unsigned int    Dimension = 2;
> > 
> > to
> > 
> >  const    unsigned int    Dimension = 3;
> > 
> > You'll also need to modify the scales of the parameters 
> (optimizerScales)
> > since the affine matrix is now 3 by 3 instead of 2 by 2.
> > 
> > Hope this helps,
> > 
> > Julien
> > 
> > 
> > 
> > > -----Original Message-----
> > > From: insight-users-bounces at itk.org
> > > [mailto:insight-users-bounces at itk.org] On Behalf Of Huss
> > > Sent: Monday, August 02, 2004 4:07 PM
> > > To: insight-users at itk.org
> > > Subject: [Insight-users] help with
> > > MultiResImageRegistration2.cxx Example
> > >
> > >
> > > Hello Luis,
> > >
> > > I am trying to run the MultiResImageRegistration2.cxx 
> example under
> > > InsightToolkit-1.6.0/Examples.
> > >
> > > I tried registring 2 Volume Images and it gave me a 
> output file which
> > > is just a single slice instead of the volume image I was 
> expecting as
> > > an output. Can U tell me what I am doing wrong.
> > >
> > > The output looked like following:
> > > Results =
> > >  Translation X = 0
> > >  Translation Y = 0
> > >  Iterations = 1
> > >  Metric Value = -0
> > >
> > > Thanks for your help
> > > Huss
> > > _______________________________________________
> > > Insight-users mailing list
> > > Insight-users at itk.org
> > > http://www.itk.org/mailman/listinfo/insight-users
> > >
> > 
> > 
> 
> 
> -- 
> Hussain Tameem
> Senior Research Engineer @ UCLA
> 924 Westwood Blvd, Suite #420
> Los Angeles, CA 90024
> http://www.ent.ohiou.edu/~hussain
> 



More information about the Insight-users mailing list