Print

Print


V = spm_vol(nifti file);
[y xyz] = spm_read_vols(V);

V.fname = same V.fname as before, except change extension to .img
instead of .nii
spm_write_vol(V,y);

spm5 will write the header for you automatically.

Best,
Michael

On Fri, Jul 18, 2008 at 2:16 PM, sheng zhang <[log in to unmask]> wrote:
> Thanks, Kathy,
>
> Are there any tools to change NIFTI files to  Analyze format so that
> SPM2 can read?
>
> Thanks,
> Sheng
>
> 2008/7/18, Kathy L Pearson <[log in to unmask]>:
>>
>>
>>
>> Sheng,
>>
>> SPM5 can read Analyze files generated by SPM2 and NIFTI files created by
>> SPM5.
>>
>> However, SPM2 does not correctly interpret the SPM5 NIFTI header (the origin
>> in particular) since it expects Analyze only.
>>
>> Kathy Pearson
>> UAB Psychology
>>
>>  ________________________________
>>  From: SPM (Statistical Parametric Mapping) on behalf of sheng zhang
>> Sent: Fri 7/18/2008 3:50 PM
>> To: [log in to unmask]
>> Subject: [SPM] about SPM5 file
>>
>>
>>
>>
>> Dear all,
>>
>> Does anyone know how to read *.img file made by SPM5 using SPM2?
>>
>> Thanks,
>> --
>> Sheng Zhang
>>
>
>
> --
> Sheng Zhang
>



-- 
Research Associate
Gazzaley Lab
Department of Neurology
University of California, San Francisco

Lab Phone # (415) 476-2164
NIC Phone # (415) 476-4232
Cell Phone # (415) 902-3138

UCSF, Mission Bay
MC2512, 1700 4th st.
Byers Hall, Room 102C
San Francisco, CA 94158

http://gazzaleylab.ucsf.edu/Michael_Rubens.html