jMRUI text format versus other formats

Hi All,

I’m a newbie when it comes to MRI spectroscopy (,so sorry for a dumb question). I want to simulate the spectra with jMRUI- NMR-SCOPE-B, and then load it in MATLAB.

In MATLAB I can load the text files jMRUI can output using the function mrs_readJmruiTXT.m (author : Chen Chen)

However the spectrum looks different (shifted?) than the original. In fact, just loading the text file back into jMRUI gives another spectrum. See uploaded file for examples.

spectro_test_formats.pdf (556.7 KB)

How do I get (or view) the same spectrum in MATLAB as that simulated in jMRUI?

Thank you,
Paul

Hi Paul,

Welcome to the forum!

Have you tried another loader function? FID-A (GitHub - CIC-methods/FID-A: Toolbox for simulation and processing of in-vivo magnetic resonance spectroscopy (MRS) data) is a very versatile MATLAB MRS package and has a build in jMRUI loader (FID-A/io_loadjmrui.m at master · CIC-methods/FID-A · GitHub).

Best,
Helge

1 Like

Hi

what version of JMRUI are you using?
looks quite strange all is happening in your simulations, but i remember that once there was a problem with the .txt files in jMRUI

i will do some simulations next week with NMRSCOPEB and will keep you posted
in the meantime also try to contact Jana @JanaS - jmrui@isibrno.cz - she is the expert on this
best
cristina

Hi Helge, Cristina,

Thank you for your response and welcoming me. I looked at it again, and I only see a difference between the .mrui and .txt file format when I do the simulation with the scanner frequency offset. This may explain it. I think the txt format does not save this frequency offset tag/header (which the jmrui display uses?)

I looked at other posts, and saw that I could also save the data directly as a .m file which is easy to load in MATLAB.

My plan is to simulate the signal with NMR-scope-B and then try different quantification programs on this data. However, two of the programs I’m using can only input DICOM files. So I acquired a dummy spectroscopy scan and wrote a small script to overwrite the existing data in the DICOM file (
example_overwrite_DICOM.pdf (65.2 KB) ) with my own simulated data.

Thank you for Jana’s contact info. I’m still working on this, and hopefully I can get it to work…

Paul

Hi Paul,
You answered the question correctly yourself. You can save simulated spectra from NMRSCOPE-B in the NMRSCOPE-B format which is a text file (.m file that can be read in Matlab). Or you can save the simulated data in the jMRUI data format (as you did). However, if you load the simulated signal (the jmrui data format) into the jMRUI 1D window and save it as a txt file, unfortunately, as you have found out, the offset is not saved in the txt file (I will fix this). Therefore then if you load the txt file later into jmrui, the frequency axis will not be calibrated correctly .
In the next version of jmrui, there will be also possibility to save the simulated results in the json format.
Jana

1 Like