Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug in DICOM import: MRScaleSlope/MRScaleIntercept with more than 1 value #5

Closed
ftadel opened this issue Oct 28, 2022 · 1 comment
Closed
Labels
bug Something isn't working

Comments

@ftadel
Copy link

ftadel commented Oct 28, 2022

A user reported this bug on the Brainstorm forum:
https://neuroimage.usc.edu/forums/t/import-mri-error/37412

After testing with the DICOM folder the user provided, I found that MRScaleSlope/MRScaleIntercept have more than one value.
Debugger at line 625 of spm_dicom_convert shows:

K>> Headers{1}.MRScaleSlope
ans =
   147   109    39    59

K>> Headers{1}.MRScaleIntercept
ans =
     0     0     0     0

This is not handled in the function, it causes the following error:

** Error: Line 625:   / 
** Matrix dimensions must agree.
** 
** Call stack:
** >spm_dicom_convert.m>WriteVolume at 625
** >spm_dicom_convert.m>ConvertStandard at 246
** >spm_dicom_convert.m at 72

@gllmflndn I'll send you the DICOM folder by email (this is not public data).

Related to this commit:
5ea021b

@gllmflndn
Copy link
Contributor

gllmflndn commented Nov 25, 2022

Thank you @ftadel for the bug report and the dataset. @JohnAshburner fixed this in 4de6136

@gllmflndn gllmflndn added the bug Something isn't working label Nov 25, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants