Home > rest_20090422 > rest_spm5_files > nic_spm_write_plane.m

nic_spm_write_plane

PURPOSE ^

Write a transverse plane of image data.

SYNOPSIS ^

function V = nic_spm_write_plane(V,dat,n)

DESCRIPTION ^

 Write a transverse plane of image data.
 FORMAT VO = spm_write_plane(V,dat,n)
 V   - data structure containing image information.
       - see spm_vol for a description.
 dat - the two dimensional image to write.
 n   - the plane number (beginning from 1).

 VO  - (possibly) modified data structure containing image information.
       It is possible that future versions of spm_write_plane may
       modify scalefactors (for example).

_______________________________________________________________________
 Copyright (C) 2005 Wellcome Department of Imaging Neuroscienic_e

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

DOWNLOAD ^

nic_spm_write_plane.m

SOURCE CODE ^

0001 function V = nic_spm_write_plane(V,dat,n)
0002 % Write a transverse plane of image data.
0003 % FORMAT VO = spm_write_plane(V,dat,n)
0004 % V   - data structure containing image information.
0005 %       - see spm_vol for a description.
0006 % dat - the two dimensional image to write.
0007 % n   - the plane number (beginning from 1).
0008 %
0009 % VO  - (possibly) modified data structure containing image information.
0010 %       It is possible that future versions of spm_write_plane may
0011 %       modify scalefactors (for example).
0012 %
0013 %_______________________________________________________________________
0014 % Copyright (C) 2005 Wellcome Department of Imaging Neuroscienic_e
0015 
0016 % John Ashburner
0017 % $Id: spm_write_plane.m 184 2005-05-31 13:23:32Z john $
0018 
0019 
0020 if isfield(V,'n'), n = num2cell([n V.n]); else n = {n}; end;
0021 S     = struct('type','()','subs',{{':',':',n{:}}});
0022 V.private.dat = subsasgn(V.private.dat,S,dat);

Generated on Wed 29-Apr-2009 01:06:38 by m2html © 2005