FSL-MRS Spec2Nii reshape issue

Hi,

I’m new to FSL-MRS and we’re currently testing out an EPSI sequence to use in future data collection. I’ve been trying to convert the data using Spec2Nii, but keep getting a reshaping error. I’ve tried looking around but most of the solutions deal with regular python coding and not this package.

Is there a known solution to getting the reshaping to work? Below I have put the error message I get when running “spec2nii dicom -f myfile myepsidir/”

Thank you for your help,
Tim

Error Message:
Found 1152 files.
Traceback (most recent call last):
File “/u/project/CCN/apps/conda/rh7/fsl-mrs/bin/spec2nii”, line 10, in
sys.exit(main())
File “/u/project/CCN/apps/conda/rh7/fsl-mrs/lib/python3.9/site-packages/spec2nii/spec2nii.py”, line 521, in main
spec2nii(*args)
File “/u/project/CCN/apps/conda/rh7/fsl-mrs/lib/python3.9/site-packages/spec2nii/spec2nii.py”, line 272, in init
args.func(args)
File “/u/project/CCN/apps/conda/rh7/fsl-mrs/lib/python3.9/site-packages/spec2nii/spec2nii.py”, line 374, in dicom
self.imageOut, self.fileoutNames = multi_file_dicom(files_in, args.fileout, args.tag, args.verbose)
File “/u/project/CCN/apps/conda/rh7/fsl-mrs/lib/python3.9/site-packages/spec2nii/dicomfunctions.py”, line 97, in multi_file_dicom
specDataCmplx, orientation, dwelltime, meta_obj = process_siemens_csi(img, verbose=verbose)
File “/u/project/CCN/apps/conda/rh7/fsl-mrs/lib/python3.9/site-packages/spec2nii/dicomfunctions.py”, line 280, in process_siemens_csi
return process_siemens_csi_vx(img, verbose)
File “/u/project/CCN/apps/conda/rh7/fsl-mrs/lib/python3.9/site-packages/spec2nii/dicomfunctions.py”, line 301, in process_siemens_csi_vx
specDataCmplx = specDataCmplx.reshape((slices, rows, cols, spectral_points))
ValueError: cannot reshape array of size 3800000 into shape (36,38,100,1000)

Hi @tjordan ,

I’ll drop you an email about getting some example data.

Will