Really depends on what you mean by "automatically" The choices I can think of are:
1-the nudge plugin - followed by 3dRotate
2-3dVolReg
3-2dImReg
Depending on exactly what you want. Check the help/readme's for these then maybe you'll be able to ask again if you're still stuck.