-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathlineageyozX.m
More file actions
51 lines (44 loc) · 1.07 KB
/
lineageyozX.m
File metadata and controls
51 lines (44 loc) · 1.07 KB
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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
function lineageyozX(A,B)
%%
F = {'_c1_ORG.tif','_c2_ORG.tif','_c3_ORG.tif'};
FF = {'*c1_*.tif','*c2_*.tif','*c3_*.tif'};
cd (strcat(A,B));
cd ('flatfield_corrected')
%%
folderlist = dir('*_s*');
folderlist.name;
for folder = {folderlist.name}
cd(folder{1})
mkdir('c1_flat')
mkdir('c2_flat')
mkdir('c3_flat')
mkdir('tiffs');
filelist = dir('*c2*.tif');
for cfile={filelist.name}
filepath = which(cfile{1});
% [a,b,~,~] = regexp(filepath,'c1');
% c = filepath(a:b);
% c(2) = '2';
% filepath(a:b) = c;
disp(filepath)
movefile(filepath,'c1_flat')
end
filelist = dir('*c1*.tif');
for cfile={filelist.name}
filepath = which(cfile{1});
% [a,b,~,~] = regexp(filepath,'c2');
% c = filepath(a:b);
% c(2) = '1';
% filepath(a:b) = c;
disp(filepath);
movefile(filepath,'c2_flat')
end
filelist = dir('*c3*.tif');
for cfile={filelist.name}
filepath = which(cfile{1});
disp(filepath);
movefile(filepath,'c3_flat')
end
cd ..
end
end