Visually combine CSI voxels for LCModel fitting

Hi All,

I’m looking for a tool to help me visually combine CSI voxels (add or mean signal) for later fitting with LCModel.

Right now I’m using SpectrIm/JMRUI to combine voxels, saving as a text file, and then using MATLAB code to read the text spectrum signal and plugging it in voxel location (1,1) of my DICOM-CSI file for LCModel fitting. It’s all quite messy and I’m not too sure if I’m doing this right :frowning_face:

What tools available to visually select voxels (CSI matrix/ anatomy image overlay) in which I can average or add the signal and then export to a format LCModel can read?

Thanks!
Paul

My set up:
main pc Windows 10: MATLAB
VM : windows for jmrui
VM: Linux for LCModel

mainly using Siemens format rda or DICOM

Hi @Paul,

This is what NIfTI-MRS was designed for!

You can convert your CSI data using GitHub - wtclarke/spec2nii: Multi-format in vivo MR spectroscopy conversion to NIFTI to the NIfTI-MRS format (DICOM is very well handled and as of the last version so is .rda). Then convert your structural data to NIfTI using GitHub - rordenlab/dcm2niix: dcm2nii DICOM to NIfTI converter: compiled versions available from NITRC . You can then view them together in fsleyes (FSLeyes - FslWiki and user guide as an up-to-date version of FSL should install the MRS viewing extension (run fsleyes -smrs path/to/mrs.nii path/to/structural.nii).

From there you can select voxels and make a nifti formatted mask using the fsleyes editing tools (or say start from a brain mask generated from bet or similar). Can talk you through this stage a bit more if needed.

Once you have this mask in the same space as your CSI scan you can then just load into e.g. matlab or python and index through the arrays together (or logically mask the CSI by the mask) and combine using mean/SVD. Then write to the LCModel raw format using e.g FIDA tools.

1 Like

Hi William,

Thank you for all the information. I’ll give it a go!

To use the FID-A tool to write the lcm file, how do I first load my spectrum (dcm or nii) so it has the right matlab structure format for this?

I like the idea of standardizing the format first to nii. However, we have a multi-vendor project coming up which includes philips mrsi, so I will need to find a way to work with this too.

Paul