I Jeff,
I don't know if it's the right thing to do for rs-fMRI to simply join 2
sequences ... but in terms of matlab you can simply do something like
cd('run002');
mypath = pwd;
list = dir(*.img);
for image=1:N
[~,name,ext]=fileparts( list(image).name);
if image<10
newname = [name(1:end-7) '00' num2str(image)]
elseif image>9 && image <100
newname = [name(1:end-7) '0' num2str(image)]
else
newname = [name(1:end-7) num2str(image)]
end
copyfile( [mypath filesep name '.img'] , [fileparts(path) filesep
'run001' newname '.img']);
copyfile( [mypath filesep name 'hrd'] , [fileparts(path) filesep
'run001' newname '.ext']);
end
cyril
> I have two rs-fMRI runs per subject in subdirectories (i.e., ../subj001/run001 and ../subj001/run002) and the resting state data has been preprocessed off the magnet with .hdr/.img/.mat files where all the files in each run directory are iteratively numbered (i.e., V0001.img…V0124.img). I would like to take the 2 resting sequences and concatenate them into one long run, with which I can then run standard SPM data prep. What is the best way to do this? If it is a matter of just putting the two sequences together one after the other in the same directory, how does one iteratively renumber the second run images so that the numbering sequence goes to V0248.img?
>
> Thanks for any pointers or assistance.
>
> Warm regards to all,
> Jeff
>
> -----------------------------------------------------------------------
> Jeff Browndyke, Ph.D.
> Clinical & Research Neuropsychologist
> Durham VA & Duke University Medical Centers
>
> [log in to unmask] / [log in to unmask]
> office: (919) 286-0411 ext. 4656
> cell: (336) 264-4222
>
--
Dr Cyril Pernet,
Centre for Clinical Brain Sciences (CCBS)
Neuroimaging Sciences
The University of Edinburgh
Chancellor's Building
Room GU426D
49 Little France Crescent
Edinburgh EH16 4SB
[log in to unmask]
tel: 0131 465 9530
http://www.sbirc.ed.ac.uk/cyril
http://www.ed.ac.uk/edinburgh-imaging
The University of Edinburgh is a charitable body, registered in
Scotland, with registration number SC005336.
|