1 | Functions to convert a saved affine matrix from FSL flirt (-omat blah.txt) to a mm-coordinates matrix, relating to the NIfTI voxel-world mappings of the source and target image. Conversion in the reverse direction (from world matrix for use with flirt -init blah.txt) is also possible. The code attempts to handle both radiological and neurological examples -- please let me know if you find a case that breaks it! (I haven't tested this with Analyze images; I think it should work, but would urge everyone to use NIfTI in preference anyway) |