source: trunk/src/read_browsdata.m @ 1189

Last change on this file since 1189 was 1189, checked in by sommeria, 22 hours ago

introduced creator of xml for PCO multitif

File size: 1.6 KB
Line 
1function [ListPath, ListSubdir]=read_browsdata (hbrowse)
2
3BrowseData=guidata(hbrowse);
4SourceDir=get(BrowseData.SourceDir,'String');
5ListExp=get(BrowseData.ListExperiments,'String');
6ExpIndices=get(BrowseData.ListExperiments,'Value');
7ListExp=ListExp(ExpIndices);
8ListDevices=get(BrowseData.ListDevices,'String');
9DeviceIndices=get(BrowseData.ListDevices,'Value');
10ListDevices=ListDevices(DeviceIndices);
11ListDataSeries=get(BrowseData.DataSeries,'String');
12DataSeriesIndices=get(BrowseData.DataSeries,'Value');
13ListDataSeries=ListDataSeries(DataSeriesIndices);
14NbExp=0; % counter of the number of experiments set by the GUI browse_data
15for iexp=1:numel(ListExp)
16    if ~isempty(regexp(ListExp{iexp},'^\+/', 'once'))% if it is a folder
17        for idevice=1:numel(ListDevices)
18            if ~isempty(regexp(ListDevices{idevice},'^\+/', 'once'))% if it is a folder
19                for isubdir=1:numel(ListDataSeries)
20                    if ~isempty(regexp(ListDataSeries{isubdir},'^\+/', 'once'))% if it is a folder
21                        lpath= fullfile(SourceDir,regexprep(ListExp{iexp},'^\+/',''),...
22                            regexprep(ListDevices{idevice},'^\+/',''));
23                        ldir= regexprep(ListDataSeries{isubdir},'^\+/','');
24                        if exist(fullfile(lpath,ldir),'dir')
25                            NbExp=NbExp+1;
26                            ListPath{NbExp}=lpath;
27                            ListSubdir{NbExp}=ldir;
28                            ExpIndex{NbExp}=iexp;
29                        end
30                    end
31                end
32            end
33        end
34    end
35end
Note: See TracBrowser for help on using the repository browser.