Snippets by category: Searching

Packages Of Snippets

Snippet ID Title
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)

Snippets

Snippet ID Title
5
Ged Ridgwayconvert saved flirt matrix to NIfTI world coords matrix

Example:
[worldmat spmvoxmat fslvoxmat] = flirtmat2worldmat(flirtmat, src, trg);
6
Ged Ridgwayconvert NIfTI world (mm) coordinates matrix to flirt

Example:
[flirtmat spmvoxmat fslvoxmat] = worldmat2flirtdmat(worldmat, src, trg);