Hi
It'll depend on what you want to do with the data. If you want to use
any of the FSL tools on the saved file why don't you simply use the
save_avw functions that we provide? This will the save your data as a
NIFTI file. You need to reshape the data back into volume or 4D
format first in matlab, then call
save_avw(data,'filename','f',[xsize,ysize, zsize,tsize])
where filename is the desired name, 'f' will save the data in floats
and [xsize,ysize,zsize,tsize] are the voxel dimensions and the TR, e.g.
save_avw(data,'blah','f',[4 4 6 3])
will save data into a file blah.nii.gz with voxel dimes of 4x4x6 mm
and a tr of 3sec
hope this helps
christian
On 24 Jul 2007, at 11:29, Xuelin Cui wrote:
> hi all:
>
> I can read data(IC spatial map) from MELODIC results. Then I simply
> reshaped the data into a 2D matrix with each row represent a single
> spatial IC. But when I was trying to write the 2D matrix in to
> another *.txt file, I had problem. I am not sure which data type
> and mechine type I should choose in matlab command 'fopen(fid,
> matrix, precision, mechinetype)', 'fwrite(fid, matrix, precision,
> mechinetype)' . Namely , the last 2 parameters in these 2 command.
> Any suggestions?
>
> Or, maybe I should create a *.dat file to save the 2D matrix? or
> any other file formats?
>
> Thanks
>
> Xuelin
> ****************************************
> Xuelin Cui
> Department of Electrical Engineering
> University of Hawaii-Manoa
> Honolulu HI 96822
>
> Tel: 1-808-349-0983
> Email: [log in to unmask]
> ****************************************
____
Christian F. Beckmann
University Research Lecturer
Oxford University Centre for Functional MRI of the Brain (FMRIB)
John Radcliffe Hospital, Headington, Oxford OX3 9DU, UK.
[log in to unmask] http://www.fmrib.ox.ac.uk/~beckmann
tel: +44 1865 222551 fax: +44 1865 222717
|