Home > rest_20090422 > rest_ChangeOrigin_Recursive.m

rest_ChangeOrigin_Recursive

PURPOSE ^

Recursive change ANALYZE 7.5 Format's Origin

SYNOPSIS ^

function Result=rest_ChangeOrigin_Recursive(ADataDir, ANewOrigin)

DESCRIPTION ^

Recursive change ANALYZE 7.5 Format's Origin
-----------------------------------------------------------
    Copyright(c) 2007~2010
    State Key Laboratory of Cognitive Neuroscience and Learning in Beijing Normal University
    Written by Xiao-Wei Song 
    http://resting-fmri.sourceforge.net
-----------------------------------------------------------
     <a href="Dawnwei.Song@gmail.com">Mail to Author</a>: Xiaowei Song
    Version=1.0;
    Release=20071101;

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

DOWNLOAD ^

rest_ChangeOrigin_Recursive.m

SOURCE CODE ^

0001 function Result=rest_ChangeOrigin_Recursive(ADataDir, ANewOrigin)
0002 %Recursive change ANALYZE 7.5 Format's Origin
0003 %-----------------------------------------------------------
0004 %    Copyright(c) 2007~2010
0005 %    State Key Laboratory of Cognitive Neuroscience and Learning in Beijing Normal University
0006 %    Written by Xiao-Wei Song
0007 %    http://resting-fmri.sourceforge.net
0008 %-----------------------------------------------------------
0009 %     <a href="Dawnwei.Song@gmail.com">Mail to Author</a>: Xiaowei Song
0010 %    Version=1.0;
0011 %    Release=20071101;
0012 
0013     %Change Self dir first
0014     rest_ChangeOrigin(ADataDir, ANewOrigin);
0015 
0016     theFileList = dir(ADataDir);    
0017     ImgDirList ={};
0018     for x = 1:size(struct2cell(theFileList),2),
0019         if theFileList(x).isdir && (~ strcmpi(theFileList(x).name,'.')) && (~ strcmpi(theFileList(x).name,'..')),
0020             ImgDirList=[ImgDirList; {theFileList(x).name}];            
0021         end
0022     end    
0023     Result =ImgDirList;
0024     
0025     for x = 1:size(ImgDirList,1),
0026         rest_ChangeOrigin(fullfile(ADataDir,ImgDirList{x}), ANewOrigin);
0027         rest_ChangeOrigin_Recursive(fullfile(ADataDir,ImgDirList{x}), ANewOrigin);
0028     end    
0029

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