Reply-To: | | [log in to unmask][log in to unmask] <mailto:[log in to unmask]>> wrote: > > thanks! > > But as it appeared I do not have a problem afterall. This only > changes the mat file John was talking about. > In a 4D nifti file there only is one header with one > voxel-to-world mapping really. > > When deleting the ensuing matfile everything behaves normally (I > will use the data in another non-matlab based package). > > CHeers, > > Bas > > > Op 04-01-12 19:05, Jose Vicente Manjon Herrera schreef: > > try this! > > > Data=spm_read_vols(V); > for t=2:length(V) > V(t).mat=V(1).mat; > spm_write_vols(V(t),Data(:,:,:,t)); > end > > hope this helps > > Jose > > > Mensaje citado por "S.F.W. Neggers"<[log in to unmask] > <mailto:[log in to unmask]>>: > > > > Dear all, > > I need to reorient (no reslice, header change only) a 4D > nifti file. > I tried to reorient my 4D nifti file in SPM8, with display > (or the batch > utils), using a pitch of 90 deg (pi/2 rad). It appeared > only the first > image in this 4D nifti file had a header that was > reoriented, the 2nd > till last had the old orientation. > > I verified this by doing > > fname='some4Dfile.nii'; > V=spm_vol(fname); > > > then, V(1).mat had changed, but V(2).mat and onwards didnt. > > With > > Data=spm_read_vols(V); > for t=2:length(V) > V(t).mat=V(1).mat; > end > spm_write_vols(V,Data); > > I couldnt fix this, as apparently spm_write_vols cant > write 4D data. > > Any ideas? > > Cheers, > > 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 B01.206, P.O. Box 85500 > 3508 GA Utrecht, the Netherlands > Tel : +31 (0)88 7559609 <tel:%2B31%20%=è ÿ2 |