Hello,
if you take a look at the code of spm_write_vol, that should get you
going. The necessary structure can easily be obtained using spm_vol and
can then be modified to your needs, as in
V = spm_select(1,'IMAGE','Select an image, please',[],pwd);
V = spm_vol(V);
noise = rand(V.dim(1:3));
[p nm e v] = fileparts(V.fname);
V.fname = [p filesep 'random_noise.img'];
V.descrip = 'random noise image';
spm_write_vol(V, noise);
Voila :)
Best,
Marko
Wang Ping schrieb:
> Dear SPM experts:
>
> I just downloaded SPM5, I am wondering is there any functions that can
> write an analyze format file (say, *.hdr, and *.img).
>
> Thanks,
> Ping Wang
>
> _________________________________________________________________
> 免费下载 MSN Explorer: http://explorer.msn.com/lccn
>
--
=====================================================================
Marko Wilke (Dr.med./M.D.)
[log in to unmask]
Universitäts-Kinderklinik University Children's Hospital
Abt. III (Neuropädiatrie) Dept. III (Pediatric neurology)
Hoppe-Seyler-Str. 1, D - 72076 Tübingen
Tel.: (+49) 07071 29-83416 Fax: (+49) 07071 29-5473
=====================================================================
|