On 11/9/11 07:59 , Ed Gronenschild wrote:
After editing a text file holding the b vecs to be supplied
as input to dt_recon this tool did not interpret the text
file correctly. It turned out that dt_recon did not recognise
the end-of line character in this file: this was decimal
code 13 (called "CR"). It seems that dt_recon only
accepts decimal code 10 (called "LF").
Is it possible to change dt_recon?
What did you use to edit the b-vec file? Different operating
systems use different end-of-line (EOL) conventions on text files:
Windows: <cr><lf>
"Old"-style (and largely depreciated) Mac: <cr>
Unix (including Mac and Linux): <lf>
My guess is that you might have used a (possibly old) Mac-based
editor to edit your file. Often such editors have the option to
save as "UNIX" format. Choose that.
It's not necessary to change 'dt_recon'. Simply convert your
old-style Mac <cr> text file to a new style <lf> file
with:
sed s/x0d/x0a/ old-b-vec-file > new-b-vec-file
This replaces the '0x0d' (10 in hex) characters in the file with
'0x0a' (13 in hex).
For more details, see:
http://www.peterbenjamin.com/seminars/crossplatform/texteol.html
--
Rudolph Pienaar, M.Eng, D.Eng / email: rudolph@nmr.mgh.harvard.edu
MGH/MIT/HMS Athinoula A. Martinos Center for Biomedical Imaging
149 (2301) 13th Street, Charlestown, MA 02129 USA