[Insight-users] Registration

David Holmes holmesd3 at yahoo . com
Thu, 31 Jul 2003 09:12:59 -0700 (PDT)


Lydia-

Thanks for your help.  I appreciate your insight and experience with
this.  Actually, I tried several of the steps that you mentioned.  I
applied a centering step but it had no effect on the result.  I also
played around with the scales with little progress.  The bottom line
difference is your choice of learning rate.  Although I played with the
learning rate, I only went down to 0.5.  I actually looked at the code
and based on the equation, I figured that a learning rate less than 0.5
wasn't particularly practical.  After you divide out the scale (let's
say scale=1), then in your case of 2e-4, the gradient step is pretty
tiny; therefore requiring the larger number of iterations that you
used.

I clearly underestimated the properties of the cost function.  I guess
this really speaks to the advantages of multi-resolution registration
because the cost-function should smooth out nicely at the lower
resolutions and the solution should be reached much quicker.


thanks again for your help.

david


--- Lydia Ng <lng at insightful . com> wrote:
> Hi David,
> 
> I played with the code and images that you provided and I have been
> able
> to get things to work for quaternion and euler3D (after some bug
> fixes
> on the Euler3DTransform. I actually haven't used this class before.
> There were some problems in computing the Jacobian. You will need to
> do
> a cvs update).
> 
> The main modifications I have made to the testing code are some
> heuristics that I typically used when doing rigid registration.
> 
> [1] Scales for the optimizer: I typically set all the rotation
> parameter
> scales to 1.0 and all the translation parameter scales to 
> 1 / vnl_math_sqr( largest dimension in mm )
> 
> [2] To help the optimizer along, I move the image origin to the
> center
> of
> the image using the ChangeInformationImageFilter.
> 
> [3] I made the number of iterations a command line parameter as well.
> 
> Results for Quaternion:
> 
> D:\lng\Insight\WorkDir\TestSpacingBug-VC7>Release\sReg2MI-Q.exe
> BaseMedium.mha MatchMedium.mha 50 2e-4 800 Output1.mhd Output2.mhd
> 
> ....
> Result =
>  Iterations    = 800
>  Metric value  = 0.623549
>  Parameters  = [0.00142203, 0.000212377, -0.000797665, 0.999999,
> 13.1426, 12.904, 0.0624338]
> Best Result =
>  Iterations    = 305
>  Metric value  = 1.13265
>  Parameters  = [9.43452e-005, 0.00165847, -0.000179486, 0.999999,
> 13.3109, 12.743, 0.139079]
> 
> 
> Results for Euler angles:
> 
> D:\lng\Insight\WorkDir\TestSpacingBug-VC7>Release\sReg2MI-EA.exe
> BaseMedium.mha MatchMedium.mha 50 2e-4 800 Output1.mhd Output2.mhd
> 
> ...
> Result =
>  Iterations    = 800
>  Metric value  = 0.61881
>  Parameters  = [-0.000621624, -0.000582881, -4.24551e-005, 13.0795,
> 12.7855, 0.0902379]
> 
> Best Result =
>  Iterations    = 305
>  Metric value  = 1.139
>  Parameters  = [1.98307e-005, -0.00188853, 0.00095573, 13.2279,
> 12.7554,
> -0.01844]
> 
> ---------------------------------
> Note that as described in the software guide, the value of MI using
> the
> V&W implementation is very noisy.
> ________________________________
> 
> Would you be able to generate some datasets with more rotational
> misalignment so that we can also do tests on them?
> ________________________________
> 
> - Lydia
> 
> > -----Original Message-----
> > From: David Holmes [mailto:holmesd3 at yahoo . com]
> > Sent: Tuesday, July 29, 2003 2:53 PM
> > To: insight-users at public . kitware . com
> > Subject: [Insight-users] Registration
> > 
> > 
> > Well, I have been playing with registration some more
> > and had little success.  Here is what I have come
> > across:
> > 
> > (1)  Because of problems with the meanssquared metric,
> > I moved on to the MI metric.
> > 
> > V&W MI work with the translation transform.  I did not
> > have any problems for a variety of mis-alignments with
> > a variety of scales. (Used ImageRegistration2.cxx)
> > 
> > (2)  V&W MI doesn't work when I go to a transform with
> > more parameters.  Euler3D and Quaternion don't work
> > regardless of the parameters I set.    Messing with
> > the scales doesn't help much.  Often I get the "mapped
> > outside" error.  I can't comment on the spacing
> > problem because I cannot get a consistent correct
> > answer.
> > 
> > For what it is worth, I am not a big fan of the
> > optimizer because even when it gets a near optimal
> > cost value, it runs away from it.  That is a real
> > challenge.
> > 
> > Thanks
> > 
> > David
> > 
> > 
> > __________________________________
> > Do you Yahoo!?
> > Yahoo! SiteBuilder - Free, easy-to-use web site design software
> > http://sitebuilder . yahoo . com
> > _______________________________________________
> > Insight-users mailing list
> > Insight-users at itk . org
> > http://www . itk . org/mailman/listinfo/insight-users
> 

> ATTACHMENT part 2 application/octet-stream name=sReg2MI-Q.cxx


> ATTACHMENT part 3 application/octet-stream name=sReg2MI-EA.cxx




__________________________________
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software
http://sitebuilder . yahoo . com