Hi
If you want to change files from hdr+img to .nii that is pretty easily done by reading the file in,
changing the extension on the filename and writing it back out.
for example
% pick the file to change.
v = spm_vol(spm_select);
% read in the data
img = spm_read_vols(v);
% change the file extension
v.fname = strrep(v.fname,'.img','.nii');
% write the file back out
spm_write_vol(v,img)
you will now have a nifti file and the hdr+img files can be deleted. You could put this into a loop
and convert all the converted dicom files to nii, backup and delete the original hdr+img files and
then according to what Volkmar said must of the rest of the output would be .nii files.
Darren
==============Original message text===============
On Mon, 04 Dec 2006 4:39:19 pm CST Volkmar Glauche wrote:
Actually, for most parts in SPM output is .nii if your input is in .nii
format.
Personally, I favour the single file format, because it allows to optimise the
file system for larger files without wasting a lot of disk space for just a
small header file.
Zitat von "Ashburner John (PSYCHOLOGY)"
<[log in to unmask]>:
> There's no easy way of doing this without heavily modifying SPM.
>
> The reason why SPM5 produces .img and .hdr files instead of .nii files
> is that we have a backup system at the FIL. Files that are modified are
> backed up more frequently, and I figured it would not be such a good
> idea to have the entire .nii file backed up whenever a little
> modification is made to a header.
>
> Best regards,
> -John
>
> -----Original Message-----
> From: SPM (Statistical Parametric Mapping) [mailto:[log in to unmask]]
> On Behalf Of Mateus Joffily
> Sent: Monday, December 04, 2006 8:34 PM
> To: [log in to unmask]
> Subject: [SPM] .nii files
>
> Hi,
>
> Is there a way of forcing spm5 to write the image files with '.nii'
> extension, instead of '.hdr+.img'?
>
> Thanks for your help,
> Mateus
>
>
===========End of original message text===========
--------------------------------
Darren R. Gitelman, M.D.
Cognitive Neurology and the Alzheimer's Disease Center
Northwestern Univ., 320 E. Superior St., Searle 11-470, Chicago, IL 60611
Voice: (312) 908-9023 Fax: (312) 908-8789
--------------------------------
|