Hi Joe,
Your supervisor is correct. There's nothing special about fMRI data and
NIFTI. Ultimately, a .nii file stores a big matrix of numbers. Whether
those numbers come from a scanner, from statistical analysis, or any
other source doesn't really matter. In your case, the numbers come from
optical imaging.
The only tricky part is the header (the meta information about the
matrix), and you can probably just fudge it by taking the header from
some other file and changing it a little bit. Use spm_vol to read a
header from any working .nii file, then change the dimensions to match
your optical data and the filename to whatever you want. Then use
spm_write_vol to write out the optical data with the new header. If you
are having rounding errors, you will probably need to adjust the .pinfo
field in the header.
-Neil
Joseph Whittaker wrote:
> Hi
>
> Does anyone know how to convert matlab files into .nii files that can
> be read by SPM. I am trying to use SPM to analyse some optical imaging
> data.
>
> I have arranged my data into a 4D struct [x y z t] although as it is
> not fMRI data there are only 2 spatial dimentsions so I have 60 frames
> of 512x512 14 bit images arranged in a matlab file as (512,512,1,60).
>
> I used the make_nii function that is available in the MatLab NIFTI and
> ANALZYE toolbox, and although it seems to work and it creats an image
> file with a header etc, when I save it as a .nii file I am still
> unable to open it with SPM.
>
> Maybe I'm barking up the wrong tree in thinking I can treat my optical
> imaging data like fMRI data, but my supervisor is convinced I can use
> SPM with optical imaging data.
>
> Any advice ot information would be much appreciated
>
> Thanks
>
> Joe
|