Hi, Philipp-
When you say that you get "bad results", what does that mean---if you put your recentered data into afni_proc.py, is the EPI-anatomical alignment not good (ve2a block), or is the anatomical-template alignment not good (va2t block)?
Note that what those sets of commands are doing is purging obliquity from the header while preserving the location of the coordinate origin. It is possible one or both dsets will appear at an angle to the FOV bounds still, if that is the initial angle was in the original data (which it appears to be here). It would be expected that the EPI-anatomical alignment won't necessarily be perfect, but the idea is that:
1) the obliquity is removed from the dsets (which different software/programs treat differently)
2) the removal does not blur the data at all (only the headers are affected, not the datasets themselves)
3) the obliquity removal preserves coordinate origin, so that
A) datasets that are semi-centered around (x,y,z)=(0,0,0) stay that way (helping anatomical-template alignment), and
B) datasets that are semi-aligned to each other remain so (helping EPI-anatomical alignment).
It is not expected/necessary that there is absolute alignment between the EPI and anatomical, esp. if there was a relative obliquity difference between them to start with, which I suspect there was here since the underlying anatomical doesn't appear to be changed by the deobliquing procedure (not a problem at all, just noting).
It also appears like the EPI brain was acquired with an angle between the "main" brain axes and the oblique acquisition slices. This procedure will not "undo" that, inherently, because the dataset won't be regridded and interpolated.
So, in summary, I am not sure there *is* a problem here, but please let us know if, say, afni_proc.py is failing for this data? The "new.jpg" image actually looks like pretty good initial alignment, esp. for a very obliquely acquired EPI.
-pt