Dear coders among you SPMers, I am writing a tool that I want to autimatically recognize whether it deals with analyze 7.5 or nifti data, when it is given a filename. Sometimes that is easily determined from the file extention, when it is given a *.nii file. When however an *.img or *.hdr file is provided, it can be both analyze or nifti, because the latter format comes in both flavours. I was hoping that this information would have been stored in the header file. In the documentation of the nifti specs at http://nifti.nimh.nih.gov/nifti-1/documentation/nifti1fields I did not find a field that, to my knowlegde, uniqely specifies a file as nifti or analyze. Perhaps the NIFTIINTENT code is useful, but it is unused in Analyze so it could theoretically be anything there and mess up automatic recognition. Perhaps some of you encountered the same issue and can give me some hints to a method that works. I would rather not have the user have to specify the file format. Regards, Bas -------------------------------------------------- Dr. S.F.W. Neggers Division of Brain Research Rudolf Magnus Institute for Neuroscience Utrecht University Medical Center Visiting : Heidelberglaan 100, 3584 CX Utrecht Room B.01.1.03 Mail : Huispost B.01.206, P.O. Box 85500 3508 GA Utrecht, the Netherlands Tel : +31 (0)88 7559609 Fax : +31 (0)88 7555443 E-mail : [log in to unmask] Web : http://www.fmri.nl/people/bas.html --------------------------------------------------