On Tue, 8 Nov 2005, LeiNa Hua wrote:
> Hi SPMers.hi,Volkmar:
> I was trying to use SPM2's routine to read and write fMRI data and
> encountered a problem:
> First I constructed a filename matrix,for example I want to read the first
> two volumes of my fMRI data:
> files = ['f2005090402-0004-00001-000001.img';'
> f2005090402-0004-00002-000002.img'];
> Then used the spm_vol to get structure info of images (V)
> V= spm_vol(files);
> Then,I used the spm_read_vols to read the data,but some error were
> reported:
> >> data = spm_read_vols(V);;
> ??? Error using ==> spm_read_vols
> images don't all have same orientation & voxel size
> what is wrong with my operation ?
Well, what is this error telling you? That orientations and perhaps voxel
sizes are different for your images. I guess, you did a realignment but no
reslice on your data. Therefore, spm_read_vols rightfully refuses to read
the images into a 4D-Matrix. You can either
- not do any realignment before reading the data
- do realign&reslice and work on resliced images
- use spm_slice_vol/spm_sample_vol to read your images.
> Can someone show me how to use these routines in right way to read and write
> fMRI( a series of 3D data )?
> Thanks in advance.
> Leina
>
--
Volkmar Glauche
-
Department of Neurology [log in to unmask]
Universitaetsklinikum Freiburg Phone 49(0)761-270-5331
Breisacher Str. 64 Fax 49(0)761-270-5416
79106 Freiburg
|