I'm sorry to repeat my question, but the entries of AC origin are still not clear to me, mainly because I don't know what is meant by "AC origin".
I now know that voxels are being counted (not the position in mm). Now, is it the origin in question related to the x, y, z offset of the slab of slices in the brain (i.e. the offset when positioning the slices during the scan), or is it the origin within the slab of slices itself? I presume it is the former.
If it is the former, then I'm not sure why it has to be relative to img(1,1,1), as opposed to the overall offset of the slab. I have my offset in mm in the readout, phase encode, and slice directions. Can I just convert these values to numbers of voxels?
Finally, is the z coordinate negative upwards, or negative downwards? (i.e. a more superior slice would have a larger negative z coordinate than a more inferior slice)
As a side note, I'm only using make_nii and save_nii, to then analyze the data in FSL.
Hopefully I've made my confusion clearer this time. Thanks for your help,
Your code has been very useful to me; I've been using make_nii and save_nii. My question is regarding the AC origin for make_nii. First of all, I presume the coordinates should be in mm, like the voxel size. Then, I was wondering if AC origin refers to the position of the central slice. If so, for the 3rd coordinate (referring to axial slices), does negative (e.g. -20) indicate an upward translation (i.e. more superior slice)? This is the convention that I'm used to, but I am not sure it applies to make_nii as well.