hi, Christian:
I just want to see those data in a file. I can save the result in NIFTI, but I feel NIFTI is not as straightforward as *txt, or *.dat. If I want to see the data in NIFTI, I probablly have to read those data and visualize them with programs such as Matlab, or some other tools.
I have managed to read the data from melodic_IC.nii.gz to my matlab, I can see the data in command window. But when I was trying to write them into some txt/dat file, problem occurred. What the txt/dat file shows is entirely mass. I tried to modified those parameters of data precision and machine type, but still dont make it so far.
Thanks a lot
Xuelin
****************************************
Xuelin Cui
Department of Electrical Engineering
University of Hawaii-Manoa
Honolulu HI 96822
Tel: 1-808-349-0983
Email: [log in to unmask]
****************************************
----- Original Message -----
From: Christian Beckmann <[log in to unmask]>
Date: Tuesday, July 24, 2007 1:25 am
Subject: Re: [FSL] question on data precision when reading/writing data of MELODIC results
To: [log in to unmask]
> 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
>
|