Back to the main page.

Bug 1772 - load_dicom_series structure mismatch

Status CLOSED FIXED
Reported 2012-10-09 16:57:00 +0200
Modified 2019-08-10 12:40:37 +0200
Product: FieldTrip
Component: external
Version: unspecified
Hardware: PC
Operating System: Linux
Importance: P3 normal
Assigned to: Arjen Stolk
URL:
Tags:
Depends on:
Blocks:
See also:

Diego Lozano Soldevilla - 2012-10-09 16:57:58 +0200

Created attachment 347 data example substructure mismatch When reading the MRI DICOM files with ft_read_mri, I got the following error: Warning: adding /home/electromag/dieloz/matlab/fieldtrip-dev/external/freesurfer toolbox to your Matlab path INFO: Found 194 files in /home/electromag/dieloz/MEG/VOGBNZ_3016028.01/participants/VOGBNZdielozS08/Session1/mri INFO: searching files for dicom, series 2 Subscripted assignment between dissimilar structures. Error in load_dicom_series (line 85) dcminfolist(nth) = dcminfo; Error in ft_read_mri (line 242) [img,transform,hdr,mr_params] = load_dicom_series(dcmdir,dcmdir,filename); Error in mri1_mark_fiducials (line 28) mri = ft_read_mri(fullfile(p, f)); Unknown to me, in the DICOMs of 2 different participants, there's a mismatch on the number of substructures inside of them. Loading the attachment, the firsts 61 DICOM files have the substructures as 'dcminfo' and 'dcminfo2' is the 62nd file that produces the error. Specifically, 'dcminfo2' doesn't have the lasts 16 substructures with the regular expression 'Private_0051'. What to do?


Arjen Stolk - 2017-04-02 05:11:56 +0200

This is still a thing I noticed recently. Did you find a solution, Diego?


Diego Lozano Soldevilla - 2017-04-02 11:01:38 +0200

Created attachment 832 fx1 Hi Gianni, Yes I did modify two FT functions I attached. I didn't go further with the fix because it only happened to me with one subject. Let me know if it works for you.


Diego Lozano Soldevilla - 2017-04-02 11:02:15 +0200

Created attachment 833 fx2 attached the second function


Arjen Stolk - 2017-04-05 08:43:06 +0200

(In reply to Diego Lozano Soldevilla from comment #3) Thanks, pal. I don't remember which scan it was, but I come across the same issue again, I'll try out your solution


Arjen Stolk - 2017-08-28 07:09:59 +0200

Amigo, implemented a fix in the spirit of your solution. However, given that it's a fix in external code, I wonder whether this is a preferred approach. Feel free to join any discussion @ https://github.com/fieldtrip/fieldtrip/pull/506


Arjen Stolk - 2017-09-05 08:47:37 +0200

Fixed with PR506


Robert Oostenveld - 2019-08-10 12:34:28 +0200

This closes a whole series of bugs that have been resolved (either FIXED/WONTFIX/INVALID) for quite some time. If you disagree, please file a new issue on https://github.com/fieldtrip/fieldtrip/issues.


Robert Oostenveld - 2019-08-10 12:40:37 +0200

This closes a whole series of bugs that have been resolved (either FIXED/WONTFIX/INVALID) for quite some time. If you disagree, please file a new issue on https://github.com/fieldtrip/fieldtrip/issues.