-
Notifications
You must be signed in to change notification settings - Fork 15
/
Copy pathlaunchPopRasterMovie.m
39 lines (30 loc) · 1.32 KB
/
launchPopRasterMovie.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
35
36
37
38
39
function launchPopRasterMovie()
rootDir = uigetdir(pwd, 'Select folder containing the downloaded sessions');
vidDir = uigetdir(pwd, 'Select folder containing the video data (cancel to skip videos but proceed)');
if ~isempty(rootDir)
d = dir(fullfile(rootDir, '*'));
d = d([d.isdir]);
sessionNames = {d.name};
sessionNames = sessionNames(~strcmp(sessionNames, '.') & ~strcmp(sessionNames,'..'));
indx = listdlg('ListString',sessionNames, 'Name', 'Select a session');
if ~isempty(indx)
% % load session
% s = loadSession(fullfile(rootDir, sessionNames{indx}));
%
% r = s.probes.rawFilename.rawFilename;
% probeNames = arrayfun(@(x)r(x,:),1:size(r,1),'uni',false);
% try to find the video
if ~isempty(vidDir)
vidPath = fullfile(vidDir, [sessionNames{indx} '_videos']);
if ~exist(vidPath, 'dir')
fprintf(1, 'Looked for the folder %s and did not find it\n', vidPath);
vidPath = [];
end
end
popRasterWrapper(s,vidPath);
% indx = listdlg('ListString',probeNames, 'Name', 'Select a recording');
% if ~isempty(indx)
% popRasterWrapper(s,indx,vidPath);
% end
end
end