It's been a while since I wrote that post (
http://blog.cogneurostats.com/?p=302) on rotating b-vectors. 3dAllineate and 3dWarpDrive both output a base-to-input matrix for the transform. However, while align_epi_anat.py uses 3dAllineate in my command, it will output two matrices, and I choose the one that seemed to make more sense to me - the matrix aligning the DWI to the anatomical dataset. One could use the other matrix and just invert the transform.
I am in full agreement with Paul: use TORTOISE. It has the ability to 1) deal with EPI distortions via a quadratic warp test (above and beyond what 3dAllineate, Eddy/eddy_correct); 2) handle all the registration to anatomical datasets with rotations of b-vectors. It does other things too, but those two are probably the two that apply most to your questions.
Edited 3 time(s). Last edit at 05/24/2017 11:13AM by Peter Molfese.