Home > marsbar > @mardo_2 > design_vol.m

design_vol

PURPOSE ^

returns vols in appropriate format for saving in design

SYNOPSIS ^

function V = design_vol(D, imgs)

DESCRIPTION ^

 returns vols in appropriate format for saving in design
 FORMAT V = design_vol(D, imgs)

 Input 
 D           - mardo design object
 imgs        - image names or vol structs
 
 Output
 V           - paths relative to swd

 $Id$

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

0001 function V = design_vol(D, imgs)
0002 % returns vols in appropriate format for saving in design
0003 % FORMAT V = design_vol(D, imgs)
0004 %
0005 % Input
0006 % D           - mardo design object
0007 % imgs        - image names or vol structs
0008 %
0009 % Output
0010 % V           - paths relative to swd
0011 %
0012 % $Id$
0013 
0014 if nargin < 2
0015   error('Need image information');
0016 end
0017 
0018 if iscell(imgs)
0019   imgs = char(imgs);
0020 end
0021 if ischar(imgs)
0022   imgs = full_vol(D, imgs);
0023 end
0024 if isstruct(imgs)
0025   V = imgs;
0026   fnames = spm_str_manip(strvcat(imgs(:).fname), 't');
0027   for i = 1:prod(size(imgs))
0028     V(i).fname = deblank(fnames(i,:));
0029   end
0030 else
0031   error('Odd input format for images');
0032 end
0033 

Generated on Wed 11-May-2022 16:26:09 by m2html © 2003-2019