What does the image look like when you view it in another viewer (eg MriCro or mri3dX)? What does one slice look like before writing? eg V=spm_vol(oldfilename); v=spm_read_vols(V); imagesc(v(:,:,V.dim(3)/2)); V.fname=new_filename; spm_write_vol(V,v); and what does it look like after writing? Are they not the same? Best, Alle Meije Anita Dhyani wrote: >Hi SPMers, >I asked a question before about spm_write_vol, but just a hint would be >okay, I have tried everything and I am beyond frustrated! When I write out >the matlab matrix into analyze format using spm_write_vol, the resulting >volume is rotated 90 degrees (i.e., the anterior-posterior direction of the >head is in the left-right direction). >Pre-rotating the volume and writing it out does not help either. any ideas >as to what i am doing wrong? I would greatly appreciate any advice. > >Thanks, > >Anita > >