Open tsalo opened 4 years ago
Parsing whitespace is trivial in most languages, we could offer examples of how to parse this in major languages. Examples: Python
vals = valstr.split()
MATLAB
vals = strsplit(valstr)
To clarify, prior to the creation of BIDS, dcm2niix would generate tab separated bvec and bval files. During the development of BIDS, @chrisgorgo strongly advocated for space separated bvec and bval files when BIDS files were created. Therefore, current versions of dcm2niix will generate tab-delimited files for -b n
and space separated files for -b y
. FSL and all the other tools I know of have no preference between these two. I liked tab-separated files simply because if you copy-paste text into a spreadsheet like Excel, it will treat space-delimited data as a single string, while tab-delimited data is pasted into separate columns. I have no strong preference, and happy to change my software, and believe that the impact of the-b
switch on these files is unintuitive for most users (so happy to use one convention in future). But as @chrisgorgo made an explicit change, I suspect he has thoughts on this.
dcm2niix and dicm2nii historically output .bvec/.bval that are tab separated. BIDS 1.0.0 specifies that those files should be space separated. A compromise might involve specifying those files as whitespace separated.
Original authors: Unknown