Hi Matthew, Although I don't have reference data, I do have an alternative implementation for reading/writing nifti-2 files, including files containing the cifti header extension. Although my code is in MATLAB, it still might be useful for your debugging efforts.
The code is implemented as part of our FieldTrip toolbox, as that toolbox will be used for the analysis of the MEG parts in the HCP. The nift-2 and cifti implementation are not yet completely finished, but can already be found on my github page on the bug2096-cifti branch (see https://github.com/oostenveld/fieldtrip/tree/bug2096-cifti and http://bugzilla.fcdonders.nl/show_bug.cgi?id=2096). Specifically you would want to go to the fieldtrip/fileio/private directory, where you see mac001> cd private/ mac001> ls *nifti2* *cifti* read_cifti.m read_nifti2_hdr.m write_cifti.m write_nifti2_hdr.m These low-level functions will in the near future be wrapped in fieldtrip/fileio/ft_read_mri.m and similar higher-level read/write functions functions. Another relevant file is the test script fieldtrip/test/test_bug2096.m (visible here: https://github.com/oostenveld/fieldtrip/blob/bug2096-cifti/test/test_bug2096.m) best regards, Robert PS don't hesitate to contact me outside the list to discuss further details, that might also help me to finalize my MATLAB implementation. On 3 Aug 2013, at 0:36, Matthew Brett wrote: > Hi, > > On Fri, Aug 2, 2013 at 3:15 PM, Timothy Coalson <[email protected]> wrote: >> You are correct, that is a bug in our code that we didn't notice, it will be >> fixed in the next release (for posterity, this bug affects 0.82 and >> earlier). I don't think we ever use -nifti-convert, which is about the only >> place that writes a nifti2 file that is broken that way (the code to write >> cifti files does not cause this problem). It might happen if you write a >> volume file with a dimension over 32767, I think that is the only other way >> to hit that bug. > > Thanks - that's helpful. > > As a matter of interest - do you know of any public nifti2 datasets > that we can test against? > > Best, > > Matthew > _______________________________________________ > HCP-Users mailing list > [email protected] > http://lists.humanconnectome.org/mailman/listinfo/hcp-users _______________________________________________ HCP-Users mailing list [email protected] http://lists.humanconnectome.org/mailman/listinfo/hcp-users
