FSL-MRS Basis Conversion for SPANT

Hi, I would like to convert a basis generated with FSL-MRS (.JSON format) to a SPANT-compatible format, since I develop my MRS pipeline in R for statistical analysis.

Thanks in advance !

Hi Clement,

Happy to take a look. Could you send me what you have so far? I’m not familiar with the .JSON format for storing basis sets.

@wclarke is there a way to export basis sets as set of NIfTI MRS files? spant has two functions (read_basis_niidir and write_basis_niidir) for dealing with this storage method.

Martin

@martin Sorry there isn’t, given that the basis standard format never quite got there I didn;t get around to implementing it. The files are very simple, they are just a directory with a JSON for each metabolite storing the FID, there is a field for real and imaginary data, the dwell and the central frequency.

thanks @wclarke, I see examples at : William Clarke / WIN MRS Basis Sets · GitLab so shouldn’t take long to implement a reader…

We should probably revive the discussions we had with @Helge a while ago on a common basis set standard.

As an example, Will, how do you handle 2D-fitting a TE series (where you have different basis sets for each spectrum)? One folder per TE?

Yes, nothing clever, just a folder per echo time. Definitely up for resurrecting the standard format discussions.

I’m not 100% sold on the nifti solution, but maybe it’s the easiest.

Yes, happy to discuss/support something simple like “the folder of NIfTI files” format, as this likely to be fine for the vast majority of users.