-
Notifications
You must be signed in to change notification settings - Fork 0
/
l_batch_checkReg.m
34 lines (28 loc) · 987 Bytes
/
l_batch_checkReg.m
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
function l_batch_checkReg(subs,runs,mriFldr,nFiles)
for s=1:numel(subs)
sub=subs(s);
imAnat=[mriFldr '/s' sprintf('%3.3d',sub) '/anat/wmasked_s' sprintf('%3.3d',sub) '.nii'];
imCh2=which('ch2bet.nii');
while 1
%%
for r=1:numel(runs)
run=runs(r);
rPull=randi(nFiles);
fldr=[mriFldr '/s' sprintf('%3.3d',sub) '/r' num2str(run) '/smooth'];
tmp=filenames([fldr '/sw*.nii'],'char');
% funcIms{run}=tmp(rPull,:);
if r==1
funcIms=char(tmp(rPull,:));
else
funcIms=char(funcIms,tmp(rPull,:));
end
end
spm_check_registration(imCh2,imAnat,funcIms)
% suptitle(['sub' num2str(sub)])
%%
k=input(['Look at another set of random functionals from s' sprintf('%3.3d',sub) '? (0=yes 1=no )']);
if k==1
break
end
end
end