I think that in this case, the problem isn't one of write permission as the error message suggests. The line "Unrecognised data type (0)" may indicate a problem with the header of the image that is attempting to be segmented. Can this image be displayed? The first thing done when segmenting an un-normalised image is an affine registration. This requires a smoothed copy of the original image in order to do the matching, and it was during this step that things went wrong. The smoothed image "spm_seg_tmp.img" is created with the same datatype, dimensions, etc as the original. In this case, the datatype of the original image was never checked - only the datatype of the one to be created. This error was cought, SPM bombed out, and calling function assumed that the failure to create a new .hdr file was a write permission thing. Best regards, -John > > When doing segmentation of structural MRI data in SPM99 I received this > > message. > > Has anyone seen this before? > > > > Rob McClure > > > > > > Warning: COLON arguments must be real scalars. > > spm_smooth....spm_vol out > > spm_smooth...spm_create image in > > spm_create_image...extracting vox size in > > spm_create_image...extracting vox size out > > spm_create_image...check for data type in > > spm_create_image...check for data type out > > spm_create_image...convert to native data type in > > Unrecognised data type (0) > > > > An error occurred in the callback : spm_segment; > > The error message caught was : Error opening spm_seg_tmp.img. Check > > that you have write permission. > > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^ > > Did you do that? I.e., do you have permission to write to the directory > where the file that you would like to segment is stored? You must have > write permission for this directory (and enough disk space in it), > otherwise spm_segment will fail. -- Dr John Ashburner. Wellcome Department of Cognitive Neurology. 12 Queen Square, London WC1N 3BG, UK. tel: +44 (0)20 78337491 or +44 (0)20 78373611 x4381 fax: +44 (0)20 78131420 http://www.fil.ion.ucl.ac.uk/~john mail: [log in to unmask]