Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F103590619
spm_write_plane.m
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Subscribers
None
File Metadata
Details
File Info
Storage
Attached
Created
Mon, Mar 3, 05:18
Size
1 KB
Mime Type
text/plain
Expires
Wed, Mar 5, 05:18 (1 d, 7 h)
Engine
blob
Format
Raw Data
Handle
24620295
Attached To
R6832 iCAPs public
spm_write_plane.m
View Options
function V = spm_write_plane(V,dat,n)
% Write transverse plane(s) of image data
% FORMAT V = spm_write_plane(V,dat,n)
% V - data structure containing image information (see spm_vol)
% dat - the two/three dimensional image to write
% n - the plane number(s) (beginning from 1). If an entire volume
% should be written, n should contain the single character ':'
% instead of plane numbers.
%
% V - (possibly) modified data structure containing image information.
% It is possible that future versions of spm_write_plane may
% modify scalefactors (for example).
%_______________________________________________________________________
% Copyright (C) 1999-2014 Wellcome Trust Centre for Neuroimaging
% John Ashburner
% $Id: spm_write_plane.m 6079 2014-06-30 18:25:37Z spm $
% For performance reasons, on network filesystems one should write
% out as large contiguous blocks data as possible at once. Therefore,
% multiple planes or even entire volumes should be handled here.
% Dimension checking is left to mat2file.
if isfield(V,'n')
n1 = num2cell(V.n);
n = {n n1{:}};
else
n = {n};
end
S = struct('type','()','subs',{{':',':',n{:}}});
V.private.dat = subsasgn(V.private.dat,S,dat);
Event Timeline
Log In to Comment