Home > fmri > utils > norm_dir.m

norm_dir

PURPOSE ^

norm_dir(dirname,instub,outstub);

SYNOPSIS ^

function norm_dir(indir,instub,outdir,outstub)

DESCRIPTION ^

 norm_dir(dirname,instub,outstub);

 Performs global intensity normalization

 dirname -- directory containing .img files to be normalized
 instub -- root of filenames to be included in normalization,
           e.g. 01aprFOOL_s02
 outdir -- directory to dump normalized files into
 outstub -- root name of output files

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

0001 function norm_dir(indir,instub,outdir,outstub)
0002 % norm_dir(dirname,instub,outstub);
0003 %
0004 % Performs global intensity normalization
0005 %
0006 % dirname -- directory containing .img files to be normalized
0007 % instub -- root of filenames to be included in normalization,
0008 %           e.g. 01aprFOOL_s02
0009 % outdir -- directory to dump normalized files into
0010 % outstub -- root name of output files
0011 %
0012 
0013 % 05/18/00 PJ
0014 
0015 if nargin < 2
0016   error('Too few args to norm_dir')
0017 end
0018 
0019 if nargin < 3
0020   outdir = indir;
0021   outstub = sprintf('gn%s', instub);
0022 elseif nargin < 4
0023   outstub = sprintf('gn%s', instub);
0024 end
0025 
0026 V = load_dir(indir,instub);
0027 
0028 nV = norm_intensity(V);
0029 
0030 write_dir(nV, outdir, outstub);
0031

Generated on Wed 20-Sep-2023 04:00:50 by m2html © 2003