Back to the main page.
Bug 2100 - ctf mri version 4.1 is not supported
Status | CLOSED FIXED |
Reported | 2013-04-10 20:44:00 +0200 |
Modified | 2013-04-23 12:06:29 +0200 |
Product: | FieldTrip |
Component: | fileio |
Version: | unspecified |
Hardware: | PC |
Operating System: | Mac OS |
Importance: | P3 normal |
Assigned to: | Robert Oostenveld |
URL: | |
Tags: | |
Depends on: | |
Blocks: | |
See also: |
Robert Oostenveld - 2013-04-10 20:44:17 +0200
One of the meg toolkit participants brought a CTF mri file that according to the header is v4.1 format. It resulted in this error: >> ft_read_mri('Sub02.mri'') Error using read_ctf_mri4/read_cpersist_value (line 280) Unsupported valuetype (7) found in CPersist object Error in read_ctf_mri4/read_cpersist (line 249) value = read_cpersist_value(fid, vtype); Error in read_ctf_mri4 (line 35) [cpersist] = read_cpersist(fid); Error in ft_read_mri (line 81) [img, hdr] = read_ctf_mri4(filename);
Robert Oostenveld - 2013-04-10 20:52:30 +0200
The CTF documentation for the fileformats listed the 7 as a unsigned int. I added that to the read_cpersist_value function and now it works. I copied the file to the test location and made a test script. mbp> git commit [bug2100 cc713ac] bugfix - resolved problem with v4.1 CTF *.mri file, see http://bugzilla.fcdonders.nl/show_bug.cgi?id=2100 2 files changed, 11 insertions(+), 2 deletions(-) create mode 100644 test/test_bug2100.m
Robert Oostenveld - 2013-04-10 20:53:57 +0200
it should now also end up on svn: mbp> git checkout master Switched to branch 'master' Your branch is ahead of 'oostenveld/master' by 1 commit. mbp> git merge bug2100 Updating 6206407..cc713ac Fast-forward fileio/private/read_ctf_mri4.m | 5 +++-- test/test_bug2100.m | 8 ++++++++ 2 files changed, 11 insertions(+), 2 deletions(-) create mode 100644 test/test_bug2100.m mbp> git push fieldtrip master Counting objects: 12, done. Delta compression using up to 2 threads. Compressing objects: 100% (7/7), done. Writing objects: 100% (7/7), 759 bytes, done. Total 7 (delta 5), reused 0 (delta 0) To git@github.com:fieldtrip/fieldtrip.git 6206407..cc713ac master -> master
Robert Oostenveld - 2013-04-23 12:05:52 +0200
closed various bugs