GannetSegment with Siemens data

Hello- We ran into this error using SiemensTWIX data from an E11c PrismaFit. SPM version is 12. Note, GannetLoad and GannetFit work and the outputs are correct but then we get the following error message:

Error using spm_vol>spm_vol_hdr (line 80)
File “image1.nii” does not exist.

Error in spm_vol (line 61)
** v = spm_vol_hdr(deblank(P(i,:)));**

Error in GannetMask_SiemensTWIX (line 110)
V = spm_vol(nii_file);

Error in GannetCoRegister (line 74)
** MRS_struct = GannetMask_SiemensTWIX(fname, nii_name{ii}, MRS_struct, ii, vox, kk);**

Error in gannetcode (line 19)
** MRS_struct = GannetCoRegister(MRS_struct,{‘image1.nii’});**

Has anyone else come across this error?

Hi @bbartnik,

Which version of Gannet are you using? Is this the only nifti file that produces this error?


Hi Mark

It’s 3.0. Sadly the error happens with the T1 nifti file from every subject we tried.


Trying using the current version of Gannet: GitHub - markmikkelsen/Gannet: Gannet is a free, open-source MATLAB-based software toolkit for analyzing edited 1H magnetic resonance spectroscopy (MRS) data.

If that doesn’t work, let me know if you’re able to share your data with me so I can debug.

Thanks. i will give it a try

Hi Mark,

I work with Brenda and still am getting the same errors even with the most recent version of Gannet. I’m trying with spm8 (also tried with spm12). I’m attaching the link to data below, would you please be able to help us troubleshoot?

Also, please see the errors below:

Error using spm_vol>subfunc (line 101)
File “image1.nii” does not exist.

Error in spm_vol>subfunc1 (line 77)
** v = subfunc(P(i,:));**

Error in spm_vol>subfunc2 (line 69)
** V = subfunc1(P);**

Error in spm_vol (line 54)
V = subfunc2(P);

Error in GannetMask_SiemensTWIX (line 113)
V = spm_vol(nii_file);

Error in GannetCoRegister (line 87)
** MRS_struct = GannetMask_SiemensTWIX(fname, struc{ii}, MRS_struct, ii, vox, kk);**

Error in GannetCode (line 19)
** MRS_struct = GannetCoRegister(MRS_struct,{‘image1.nii’});**

Have tried with both the compressed and unzipped anatomical NIFTI.

Thank you!

Hi @rhi,

Please provide me with your email address as well.


Thank you!