Problems loading HERMES and MEGA-PRESS dicom data

Hi all,

I am running into some issues when trying to load HERMES and MEGA-PRESS dicom data from a Siemens scanner. For HERMES I get this error message:

Index in position 3 exceeds array bounds (must not exceed 2).

Error in op_takesubspec (line 35)
fids=in.fids(:,:,index);

Error in osp_LoadDICOM (line 86)
raw_ref_C = op_takesubspec(MRSCont.raw_ref{kk},3);

Error in OspreyLoad (line 66)
[MRSCont] = osp_LoadDICOM(MRSCont);

Error in osp_onLoad (line 32)
MRSCont = OspreyLoad(MRSCont);

The data provided are in folders that contain single averages dicom files, so I am not sure whatā€™s going on. I have uploaded a sample in our shared folder in case you have time to take a look at the data Iā€™m using.

As for the MEGA-PRESS data, the issue I ran into was that it would not load the correct basis set. Osprey would identify the sequence as MEGA (from the read_dcm_header.m function) but was missing PRESS, so the osp_fitInitialise.m function would load the basis set from the user folder instead.

I did not run into any issues when using the TWIX files instead, but we were hoping to be able to use the DICOM files as they take less storage and can be easily stored with each subjectā€™s scan.

As always, thanks for any help you can provide.

Best,
-Humberto

Hi Humberto,

Iā€™ve fixed the dicom loader for MEGA-PRESS, MEGA-sLASER, and HERMES. Please let me know whether the latest update fixes the problem.

Best,
Helge

Hi Helge,

So far Iā€™ve tried it for MEGA-PRESS and HERMES, and everything seems to be working. Thanks a lot for fixing this! I will let you know if I run into any issues for MEGA-sLASER.

Best,
-Humberto

Hi Humberto,

thatā€™s great news.

With regards to the MEGA-sLASER, Iā€™m very close to releasing a frequency restricted spectral registration to circumvent the problem with the residual water signal (Iā€™m not sure if this problem still persists or whether youā€™ve changed the water suppression during the acquisitions). Iā€™ll upload this in the next days, so you may want to hold MEGA-sLASER data for a few days.

Best,
Helge

Hi Humberto,

Iā€™ve just released the frequency restricted spectral registration. You can specify the method in your jobFile by adding opts.SpecReg = 'RobSpecReg'; with three options RobSpecReg which is the standard robust spectral registration, RestrSpecReg which performs a time domain spectral registration but is restricted to the ppm range similar to the specified fit range, and none to omit spectral registration.

Let me know if this works for you.

Best,
Helge

1 Like

Hi Helge,

Thanks a lot for adding this feature! I will go ahead a test it in the next couple days and report back if i run into any issues.

Humberto

Hi Helge,

I am once again working with more MEGA-sLASER data, and I am running into similar issues with the alignment of the spectra. I have attached here an example of what I have tried so far. The first figure corresponds to the default robust spectral registration. The second figure corresponds to the frequency restricted spectral registration, and the third figure corresponds to no registration. As you can see, when I omit spectra registration, the diff spectrum ā€œlooks betterā€. When I use the ON and OFF RDA files from the scanner and subtract them using the FID-A tools, I get an even ā€œbetterā€ spectrum. I understand that these data are of the best quality, but I wonder why the results are so different. These data were not acquired with weak water suppression, so I didnā€™t expect the robust spectral registration to give me a good diff spectrum, but even with spectral registration turned off, the diff spectrum looks weird. Do you have any idea as to why this might be? Should I be removing bad averages before processing the final spectrum? Iā€™d welcome any suggestions you might have and Iā€™d be happy to share some of the data in our shared folder.

Thanks!
-Humberto




Hi Humberto,

thanks for sharing this issue with us. Could you share this data set and your jobFile with me, so that I can figure out where it goes off?

Best,
Helge

Hi Helge,

Yes, of course! I put the data set in the OneDrive shared folder along with my job files.

Thanks!
Humberto

Hi @hmonsivais,

I did manage to improve the alignment for your MEGA spectra. If you change/add the following lines to your jobFile after downloading from GitHub the quality of the processed difference spectra should improve:

opts.SpecReg = ā€˜RestrSpecRegā€™;
opts.SpecRegRange = [1.85 3.4]; % [ppm] Default: [0.2 4.2]
opts.UnstableWater = 1;

The shot-to-shat alignment struggles with the signals > 3.4 ppm in your spectra, I assume due to the water suppression or unwanted echos in this region. And in one of the datasets, there is a fat/mm peak which has different phases depending on the water suppression. Therefore, Iā€™ve restricted the frequency range to 1.85 to 3.4 ppm.

Iā€™ll look into the HERMES data as well.

Best,
Helge

Thanks so much, Helge! I will update my local files and give them a try.

-Humberto

Hi @Helge,

I am now running into some issues with MEGA-PRESS data :sweat_smile:. I attached here a couple of examples of the results. When I process the data through Gannet, the results look a little better. From what I understand, the spectral registration is the same? Or is this not the case? I turned off the 3Hz filter on Gannet to make it more comparable.

27mL_MEGAwip_GABA_cereb_Voxel_1_OspreyProcess_diff1.pdf (3.4 MB)
27mL_MEGAwip_GABA_cereb_vox1_load.pdf (920.3 KB)
20.2mL_MEGAwip_GABA_thal_Voxel_1_OspreyProcess_diff1.pdf (3.4 MB)
20.2mL_MEGAwip_GABA_thal_vox1_load.pdf (968.0 KB)

I also added these data sets to shared OneDrive folder.

Thanks!
-Humberto

Hi @hmonsivais,

The spectral registration seems to be working similarly for Osprey and Gannet. The problem seems to be the sub-spectra alignment of the averaged spectra. I just saw that in there was a typo in the example jobFiles. Is opts.SubSpecAlignment = 'L2Norm' set this way in your jobFile with capital letter N and not opts.SubSpecAlignment = 'L2norm'. This option worked fine for me. See attached plots.

sub-01_ses-01_cereb_press_Voxel_1_OspreyProcess_diff1.pdf (2.3 MB)

sub-01_ses-01_thal_press_Voxel_1_OspreyProcess_diff1.pdf (2.3 MB)

Let me know if this works.

Best,
Helge

P.S.: Iā€™ve tested it on the newest Osprey release v1.0.2.1

Hi @Helge,

Yep, looks like the typo was the problem! As always, thanks for looking into this.

Best,
Humberto

1 Like