Home > marsbar > @maroi > private > my_roifname.m

my_roifname

PURPOSE ^

changes fname to appropriate ROI format

SYNOPSIS ^

function roifname = my_roifname(fname)

DESCRIPTION ^

 changes fname to appropriate ROI format

 $Id$

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

0001 function roifname = my_roifname(fname)
0002 % changes fname to appropriate ROI format
0003 %
0004 % $Id$
0005 
0006 if nargin < 1
0007   fname = [];
0008 end
0009 roifname = fname;
0010 if isempty(fname)
0011   return
0012 end
0013 gend = maroi('classdata', 'fileend');
0014 lg = length(gend);
0015 
0016 [p f e] = fileparts(roifname);
0017 f2 = [f e];
0018 if length(f2)<lg | ~strcmp(gend, [f2(end - lg +1 : end)])
0019   roifname = fullfile(p, [f gend]);
0020 end
0021 % make absolute path
0022 roifname = spm_get('cpath', roifname);

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