Changeset 460 for trunk


Ignore:
Timestamp:
Jun 20, 2012, 12:01:16 PM (13 years ago)
Author:
sommeria
Message:

cleaning and bugs corrected

Location:
trunk/src
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/check_files.m

    r432 r460  
    8383    'read_civxdata';...reads civx data from netcdf files
    8484    'read_civdata';... reads new civ data from netcdf files
     85    'read_image';... read images or video objects
    8586    'read_get_field';... read the list of selected variables from the GUI get_field (TODO: use read_GUI)
    8687    'read_GUI';... %read all parameters set by a GUI as a Matlab structure
    87     'read_imatext';...%read .civ files (obsolete, but can be adapted to other text documentation files)
     88    'read_image';...%read .civ files (obsolete, but can be adapted to other text documentation files)
    8889    'read_xls';...%read excel files containing the list of the experiments
    8990    'reinit';...% suppress the personal parameter file 'uvmat_perso.mat'
  • trunk/src/fill_GUI.m

    r427 r460  
    2424                set(hh,'Visible','on')
    2525                if ischar(input_data)
    26                     input_data={input_data}% transform string to a single cell if needed
     26                    input_data={input_data};% transform string to a single cell if needed
    2727                end
    2828                set(hh,'Data',input_data)
  • trunk/src/imadoc2struct.m

    r456 r460  
    3030[tild,tild,FileExt]=fileparts(ImaDoc);
    3131if strcmp(FileExt,'.civ')
    32     [errormsg,time,TimeUnit,mode,npx,npy,XmlData{iview}.GeometryCalib]=read_imatext(ImaDoc);
     32    [errormsg,time,TimeUnit,mode,npx,npy,s.GeometryCalib]=read_imatext(ImaDoc);
    3333    return
    3434end
     
    295295function [error,time,TimeUnit,mode,npx,npy,GeometryCalib]=read_imatext(fileinput)
    296296%------------------------------------------------------------------------
    297 error=0;%default
     297error='';%default
    298298time=[]; %default
    299299TimeUnit='s';
     
    301301npx=[]; %default
    302302npy=[]; %default
    303 pxcmx=1;%default
    304 pxcmy=1;%default
    305 if exist(fileinput,'file')~=2, error=2, return;end;%input file does not exist
     303GeometryCalib=[];
     304if ~exist(fileinput,'file'), error=['image doc file ' fileinput ' does not exist']; return;end;%input file does not exist
    306305dotciv=textread(fileinput);
    307306sizdot=size(dotciv);
  • trunk/src/series.m

    r458 r460  
    7272set(handles.PairString,'ColumnWidth',{60})
    7373set(handles.PairString,'Data',{''})
    74 % set(0,'Units','pixels')
    75 % screensize=get(0,'ScreenSize'); %screen size in pixels
    7674set(hObject,'WindowButtonDownFcn',{'mouse_down'})%allows mouse action with right button (zoom for uicontrol display)
    77 %set(hObject,'Position',[150 100 1000 600] );%position and size in pixels (get adjusted to the screen size in case of excess)
    78 %load the list of previously browsed files in menus Open and Open_1
    7975dir_perso=prefdir;
    8076test_profil_perso=0;
     
    8278if exist(profil_perso,'file')
    8379     h=load (profil_perso);
     80     if isfield(h,'MenuFile')
     81          for ifile=1:min(length(h.MenuFile),5)
     82              eval(['set(handles.MenuFile_' num2str(ifile) ',''Label'',h.MenuFile{ifile});'])
     83%               eval(['set(handles.MenuFile_' num2str(ifile) '_1,''Label'',h.MenuFile{ifile});'])
     84          end
     85     end
     86%      if isfield(h,'MenuFile')
     87%           for ifile=1:min(length(h.MenuFile),5)
     88%               eval(['set(handles.MenuFile_' num2str(ifile) ',''Label'',h.MenuFile{ifile});'])
     89%                eval(['set(handles.MenuFile_' num2str(ifile) '_1,''Label'',h.MenuFile{ifile});'])
     90%           end
     91%       end
     92     
    8493     test_profil_perso=1;
    85      if isfield(h,'MenuFile_1') && exist(h.MenuFile_1,'file')
    86           set(handles.MenuFile_1,'Label',h.MenuFile_1);
    87           set(handles.MenuFile_insert_1,'Label',h.MenuFile_1);
    88      end
    89      if isfield(h,'MenuFile_2')&& exist(h.MenuFile_2,'file')
    90           set(handles.MenuFile_2,'Label',h.MenuFile_2);
    91           set(handles.MenuFile_insert_2,'Label',h.MenuFile_2);
    92      end
    93      if isfield(h,'MenuFile_3')&& exist(h.MenuFile_3,'file')
    94           set(handles.MenuFile_3,'Label',h.MenuFile_3);
    95           set(handles.MenuFile_insert_3,'Label',h.MenuFile_3);
    96      end
    97      if isfield(h,'MenuFile_4')&& exist(h.MenuFile_4,'file')
    98           set(handles.MenuFile_4,'Label',h.MenuFile_4);
    99           set(handles.MenuFile_insert_4,'Label',h.MenuFile_4);
    100      end
    101      if isfield(h,'MenuFile_5')&& exist(h.MenuFile_5,'file')
    102           set(handles.MenuFile_5,'Label',h.MenuFile_5);
    103           set(handles.MenuFile_insert_5,'Label',h.MenuFile_5);
    104      end
     94%      if isfield(h,'MenuFile_1') && exist(h.MenuFile_1,'file')
     95%           set(handles.MenuFile_1,'Label',h.MenuFile_1);
     96%           set(handles.MenuFile_insert_1,'Label',h.MenuFile_1);
     97%      end
     98%      if isfield(h,'MenuFile_2')&& exist(h.MenuFile_2,'file')
     99%           set(handles.MenuFile_2,'Label',h.MenuFile_2);
     100%           set(handles.MenuFile_insert_2,'Label',h.MenuFile_2);
     101%      end
     102%      if isfield(h,'MenuFile_3')&& exist(h.MenuFile_3,'file')
     103%           set(handles.MenuFile_3,'Label',h.MenuFile_3);
     104%           set(handles.MenuFile_insert_3,'Label',h.MenuFile_3);
     105%      end
     106%      if isfield(h,'MenuFile_4')&& exist(h.MenuFile_4,'file')
     107%           set(handles.MenuFile_4,'Label',h.MenuFile_4);
     108%           set(handles.MenuFile_insert_4,'Label',h.MenuFile_4);
     109%      end
     110%      if isfield(h,'MenuFile_5')&& exist(h.MenuFile_5,'file')
     111%           set(handles.MenuFile_5,'Label',h.MenuFile_5);
     112%           set(handles.MenuFile_insert_5,'Label',h.MenuFile_5);
     113%      end
    105114end
    106115
     
    261270SeriesData=[];%dfault
    262271if isequal(ext,'.xml')
    263     msgbox_uvmat('ERROR','input file type not implemented')%A Faire: ouvrir le fichier pour naviguer
     272     Param=xml2struct(fileinput);
     273    fill_GUI(Param,handles);%fill the GUI with the parameters retrieved from the xml file
     274    return
    264275elseif isequal(ext,'.xls')
    265276    msg_box_uvmat('ERROR','input file type not implemented')%A Faire: ouvrir le fichier pour naviguer
     
    470481set(handles.InputTable,'Data',InputTable)
    471482
    472 %update the output dir
    473 SubDir=sort(InputTable(:,2)); %set of subdirectories sorted in alphabetical order
    474 SubDirOut=SubDir{1};
    475 if numel(SubDir)>1
    476     for ilist=2:numel(SubDir)
    477         SubDirOut=[SubDirOut '-' SubDir{ilist}];
    478     end
    479 end
    480 set(handles.OutputSubDir,'String',SubDirOut)
    481 
    482 %% determine the selected reference field indices for pair display
    483 ref_i=1; %default ref_i is a reference frame index used to find existing pairs from PIV
    484 if ~isempty(i1)
    485     ref_i=i1;
    486     if ~isempty(i2)
    487         ref_i=floor((ref_i+i2)/2);% reference image number corresponding to the file
    488     end
    489 end
    490 set(handles.num_ref_i,'String',num2str(ref_i));
    491 ref_j=1; %default  ref_j is a reference frame index used to find existing pairs from PIV
    492 if ~isempty(j1)
    493     ref_j=j1;
    494     if ~isempty(j2)
    495         ref_j=floor((j1+j2)/2);
    496     end         
    497 end
    498 set(handles.num_ref_j,'String',num2str(ref_j));
    499 
    500 %% update the list of recent files in the menubar and save it for future opening
    501 MenuFile=[{get(handles.MenuFile_1,'Label')};{get(handles.MenuFile_2,'Label')};...
    502     {get(handles.MenuFile_3,'Label')};{get(handles.MenuFile_4,'Label')};{get(handles.MenuFile_5,'Label')}];
    503 str_find=strcmp(fileinput,MenuFile);
    504 if isempty(find(str_find,1))
    505     MenuFile=[{fileinput};MenuFile];%insert the current file if not already in the list
    506 end
    507 for ifile=1:min(length(MenuFile),5)
    508     eval(['set(handles.MenuFile_' num2str(ifile) ',''Label'',MenuFile{ifile});'])
    509     eval(['set(handles.MenuFile_insert_' num2str(ifile) ',''Label'',MenuFile{ifile});'])
    510 end
    511 dir_perso=prefdir;
    512 profil_perso=fullfile(dir_perso,'uvmat_perso.mat');
    513 if exist(profil_perso,'file')
    514     save (profil_perso,'MenuFile','-append'); %store the file names for future opening of uvmat
    515 else
    516     save (profil_perso,'MenuFile','-V6'); %store the file names for future opening of uvmat
    517 end
    518 
    519 set(handles.InputTable,'BackgroundColor',[1 1 1])
    520 
    521 %% initiate input file series and refresh the current field view:     
    522 update_rootinfo(handles,i1_series,i2_series,j1_series,j2_series,FileType,MovieObject,lastview);
    523 
    524 %------------------------------------------------------------------------
    525 % --- Update information about a new field series (indices to scan, timing,
    526 %     calibration from an xml file, then refresh current plots
    527 function update_rootinfo(handles,i1_series,i2_series,j1_series,j2_series,FileType,VideoObject,iview)
    528 %------------------------------------------------------------------------
    529 
    530 %% enable j index visibility
    531 if isempty(j1_series)
    532     state='off';
    533 else
    534     state='on';
    535 end
    536 enable_j(handles,state)
    537 
    538483%% display the min and max indices for all the file series
    539 MinIndex=get(handles.MinIndex,'Data');%retrieve the min indices in the table MinIndex
    540 MaxIndex=get(handles.MaxIndex,'Data');%retrieve the max indices in the table MaxIndex
    541484i_sum=sum(sum(i1_series,2),3);%sum of i1_series on the last index
    542485MaxIndex_i=max(find(i_sum>0))-1;
    543 if isequal(i1_series(1),0)
     486MinIndex_i=min(find(i_sum>0))-1;
     487if isequal(MinIndex_i,1) && exist (fullfile_uvmat(RootPath,SubDir,RootFile,FileExt,NomType,0,i2_series(2,2),j1_series(2,2),j2_series(2,2)),'file')
    544488    MinIndex_i=0;
    545 else
    546     MinIndex_i=min(find(i_sum>0))-1;
    547489end
    548490j_sum=sum(sum(j1_series,1),3);
    549491MaxIndex_j=max(find(j_sum>0))-1;
    550492MinIndex_j=min(find(j_sum>0))-1;
    551 MinIndex{iview,1}=MinIndex_i;
    552 MinIndex{iview,2}=MinIndex_j;
    553 MaxIndex{iview,1}=MaxIndex_i;
    554 MaxIndex{iview,2}=MaxIndex_j;
     493MinIndex=get(handles.MinIndex,'Data');%retrieve the min indices in the table MinIndex
     494MaxIndex=get(handles.MaxIndex,'Data');%retrieve the max indices in the table MaxIndex
     495MinIndex{lastview,1}=MinIndex_i;
     496MinIndex{lastview,2}=MinIndex_j;
     497MaxIndex{lastview,1}=MaxIndex_i;
     498MaxIndex{lastview,2}=MaxIndex_j;
     499
    555500set(handles.MinIndex,'Data',MinIndex)%display the min indices in the table MinIndex
    556501set(handles.MaxIndex,'Data',MaxIndex)%display the max indices in the table MaxIndex
     
    587532set(handles.num_last_i,'String',num2str(last_i));
    588533set(handles.num_last_j,'String',num2str(last_j));
     534
     535
     536%% update the output dir
     537SubDir=sort(InputTable(:,2)); %set of subdirectories sorted in alphabetical order
     538SubDirOut=SubDir{1};
     539if numel(SubDir)>1
     540    for ilist=2:numel(SubDir)
     541        SubDirOut=[SubDirOut '-' SubDir{ilist}];
     542    end
     543end
     544set(handles.OutputSubDir,'String',SubDirOut)
     545
     546%% determine the selected reference field indices for pair display
     547ref_i=1; %default ref_i is a reference frame index used to find existing pairs from PIV
     548if ~isempty(i1)
     549    ref_i=i1;
     550    if ~isempty(i2)
     551        ref_i=floor((ref_i+i2)/2);% reference image number corresponding to the file
     552    end
     553end
     554set(handles.num_ref_i,'String',num2str(ref_i));
     555ref_j=1; %default  ref_j is a reference frame index used to find existing pairs from PIV
     556if ~isempty(j1)
     557    ref_j=j1;
     558    if ~isempty(j2)
     559        ref_j=floor((j1+j2)/2);
     560    end         
     561end
     562set(handles.num_ref_j,'String',num2str(ref_j));
     563
     564%% update the list of recent files in the menubar and save it for future opening
     565MenuFile=[{get(handles.MenuFile_1,'Label')};{get(handles.MenuFile_2,'Label')};...
     566    {get(handles.MenuFile_3,'Label')};{get(handles.MenuFile_4,'Label')};{get(handles.MenuFile_5,'Label')}];
     567str_find=strcmp(fileinput,MenuFile);
     568if isempty(find(str_find,1))
     569    MenuFile=[{fileinput};MenuFile];%insert the current file if not already in the list
     570end
     571for ifile=1:min(length(MenuFile),5)
     572    eval(['set(handles.MenuFile_' num2str(ifile) ',''Label'',MenuFile{ifile});'])
     573    eval(['set(handles.MenuFile_insert_' num2str(ifile) ',''Label'',MenuFile{ifile});'])
     574end
     575dir_perso=prefdir;
     576profil_perso=fullfile(dir_perso,'uvmat_perso.mat');
     577if exist(profil_perso,'file')
     578    save (profil_perso,'MenuFile','-append'); %store the file names for future opening of uvmat
     579else
     580    save (profil_perso,'MenuFile','-V6'); %store the file names for future opening of uvmat
     581end
     582
     583set(handles.InputTable,'BackgroundColor',[1 1 1])
     584
     585%% initiate input file series and refresh the current field view:     
     586update_rootinfo(handles,i1_series,i2_series,j1_series,j2_series,FileType,MovieObject,lastview);
     587
     588%------------------------------------------------------------------------
     589% --- Update information about a new field series (indices to scan, timing,
     590%     calibration from an xml file, then refresh current plots
     591function update_rootinfo(handles,i1_series,i2_series,j1_series,j2_series,FileType,VideoObject,iview)
     592%------------------------------------------------------------------------
     593
     594%% enable j index visibility
     595if isempty(j1_series)
     596    state='off';
     597else
     598    state='on';
     599end
     600enable_j(handles,state)
    589601
    590602%% read timing and total frame number from the current file (movie files) !! may be overrid by xml file
     
    675687
    676688%% number of slices
    677 NbSlice=MaxIndex_j-MinIndex_j+1;%default
     689NbSlice=1;%default
    678690if isfield(XmlData,'GeometryCalib') && isfield(XmlData.GeometryCalib,'SliceCoord')
    679691    siz=size(XmlData.GeometryCalib.SliceCoord);
     
    799811end
    800812
    801 return
    802 
    803 %% set default options in menu 'Fields'%% TODO: check VelType
    804 if ~testima
    805     testcivx=0;
    806     if isfield(UvData,'FieldsString') && isequal(UvData.FieldsString,{'get_field...'})% field menu defined as input (from get_field)
    807         set(handles_Fields,'Value',1)
    808         set(handles_Fields,'String',{'get_field...'})
    809         UvData=rmfield(UvData,'FieldsString');
    810     else
    811         Data=nc2struct(FileName,'ListGlobalAttribute','Conventions','absolut_time_T0','civ');
    812         if strcmp(Data.Conventions,'uvmat/civdata') ||( ~isempty(Data.absolut_time_T0)&& ~isequal(Data.civ,0))%if the new input is Civx
    813             FieldList=calc_field;
    814             set(handles_Fields,'String',[{'image'};FieldList;{'get_field...'}]);%standard menu for civx data
    815             set(handles_Fields,'Value',2) % set menu to 'velocity'
    816             col_vec=FieldList;
    817             col_vec(1)=[];%remove 'velocity' option for vector color (must be a scalar)
    818             testcivx=1;
    819         end
    820         if ~testcivx
    821             set(handles_Fields,'Value',1) % set menu to 'get_field...
    822             set(handles_Fields,'String',{'get_field...'})
    823             col_vec={'get_field...'};
    824         end
    825         set(handles.ColorScalar,'String',col_vec)
    826     end
    827 end
    828 set(handles.uvmat,'UserData',UvData)
    829 
    830 %% set index navigation options and refresh plots
    831 scan_option='i';%default
    832 state_j='off'; %default
    833 if index==2
    834     if get(handles.scan_j,'Value')
    835         scan_option='j'; %keep the scan option for the second fiel series
    836     end
    837     if strcmp(get(handles.j1,'Visible'),'on')
    838         state_j='on';
    839     end
    840 end
    841 if ~isempty(j1_series)
    842         state_j='on';
    843         if isequal(nbfield,1) &&index==1
    844             scan_option='j'; %scan j index by default if nbfield=1               
    845         end
    846 end
    847 if isequal(scan_option,'i')
    848      set(handles.scan_i,'Value',1)
    849      scan_i_Callback([],[], handles);
    850 else
    851      set(handles.scan_j,'Value',1)
    852      scan_j_Callback([],[], handles);
    853 end
    854 set(handles.scan_j,'Visible',state_j)
    855 set(handles.j1,'Visible',state_j)
    856 set(handles.j2,'Visible',state_j)
    857 set(handles.last_j,'Visible',state_j);
    858 set(handles.frame_j,'Visible',state_j);
    859 set(handles.j_text,'Visible',state_j);
    860 if ~isempty(i2_series)||~isempty(j2_series)
    861     set(handles.CheckFixPair,'Visible','on')
    862 elseif index==1
    863     set(handles.CheckFixPair,'Visible','off')
    864 end
    865 
    866 
    867 mode_Callback(hObject, eventdata, handles)
    868 
    869 set(handles.REFRESH_INDICES,'BackgroundColor',[0.7 0.7 0.7])
    870 InputTable=get(handles.InputTable,'Data');
    871 check_lines=get(handles.REFRESH_INDICES,'UserData');
    872 
    873 %% check the indices and FileTypes for each series (limited to the new ones to save time)
    874 for ind_list=1:length(check_lines)
    875     if  check_lines(ind_list)
    876         InputLine=InputTable(ind_list,:);
    877         detect_idem=strcmp('"',InputLine);% look for '" (repeat of previous data)
    878         detect_idem=detect_idem(detect_idem>0);
    879         if ~isempty (detect_idem)
    880             InputLine(detect_idem)=InputTable(ind_list-1,detect_idem);
    881             set(handles.InputTable,'Data',InputTable)
    882         end
    883         fileinput=fullfile_uvmat(InputLine{1},InputLine{2},InputLine{3},InputLine{5},InputLine{4},1,2,1,2);
    884         %fileinput=name_generator(fullfile(InputLine{1},InputLine{3}),1,1,InputLine{5},InputLine{4},1,2,2,InputLine{2})
    885         %update file series defined by the selected line
    886         [InputTable{ind_list,3},InputTable{(ind_list),4},errormsg]=update_indices(handles,fileinput,ind_list);
    887         if ~isempty(errormsg)
    888                 msgbox_uvmat('ERROR',errormsg)
    889                 return
    890         end
    891     end
    892 end
    893 set(handles.InputTable,'Data',InputTable)
    894 SeriesData=get(handles.series,'UserData');
    895 
    896 state_j='off';
    897 state_Pairs='off';
    898 state_InputFields='off';
    899 val=get(handles.ListView,'Value');
    900 ListViewString={''};
    901 if ~isempty(SeriesData)
    902 %     ListViewString={};
    903     for iview=1:size(InputTable,1)
    904         if ~isempty(SeriesData.j1_series{iview})
    905             state_j='on';
    906         end
    907         if ~isempty(SeriesData.i2_series{iview})||~isempty(SeriesData.j2_series{iview})
    908             state_Pairs='on';
    909             ListViewString{iview}=num2str(iview);
    910             if check_lines(iview)
    911                 val=iview;%select the last pair if it is a new entry
    912             end
    913         end
    914         if strcmp(SeriesData.FileType{iview},'civx')||strcmp(SeriesData.FileType{iview},'civdata')
    915             state_InputFields='on';
    916         end
    917     end
    918 end
    919 set(handles.ListView,'Value',val)
    920 set(handles.ListView,'String',ListViewString)
    921 if strcmp(state_Pairs,'on')
    922     ListView_Callback(hObject,eventdata,handles)
    923 end
    924 set(handles.PairString,'Visible',state_Pairs)
    925 enable_j(handles,state_j)
     813% %% set default options in menu 'Fields'%% TODO: check VelType
     814% if ~testima
     815%     testcivx=0;
     816%     if isfield(UvData,'FieldsString') && isequal(UvData.FieldsString,{'get_field...'})% field menu defined as input (from get_field)
     817%         set(handles_Fields,'Value',1)
     818%         set(handles_Fields,'String',{'get_field...'})
     819%         UvData=rmfield(UvData,'FieldsString');
     820%     else
     821%         Data=nc2struct(FileName,'ListGlobalAttribute','Conventions','absolut_time_T0','civ');
     822%         if strcmp(Data.Conventions,'uvmat/civdata') ||( ~isempty(Data.absolut_time_T0)&& ~isequal(Data.civ,0))%if the new input is Civx
     823%             FieldList=calc_field;
     824%             set(handles_Fields,'String',[{'image'};FieldList;{'get_field...'}]);%standard menu for civx data
     825%             set(handles_Fields,'Value',2) % set menu to 'velocity'
     826%             col_vec=FieldList;
     827%             col_vec(1)=[];%remove 'velocity' option for vector color (must be a scalar)
     828%             testcivx=1;
     829%         end
     830%         if ~testcivx
     831%             set(handles_Fields,'Value',1) % set menu to 'get_field...
     832%             set(handles_Fields,'String',{'get_field...'})
     833%             col_vec={'get_field...'};
     834%         end
     835%         set(handles.ColorScalar,'String',col_vec)
     836%     end
     837% end
     838% set(handles.uvmat,'UserData',UvData)
     839%
     840% %% set index navigation options and refresh plots
     841% scan_option='i';%default
     842% state_j='off'; %default
     843% if index==2
     844%     if get(handles.scan_j,'Value')
     845%         scan_option='j'; %keep the scan option for the second fiel series
     846%     end
     847%     if strcmp(get(handles.j1,'Visible'),'on')
     848%         state_j='on';
     849%     end
     850% end
     851% if ~isempty(j1_series)
     852%         state_j='on';
     853%         if isequal(nbfield,1) &&index==1
     854%             scan_option='j'; %scan j index by default if nbfield=1               
     855%         end
     856% end
     857% if isequal(scan_option,'i')
     858%      set(handles.scan_i,'Value',1)
     859%      scan_i_Callback([],[], handles);
     860% else
     861%      set(handles.scan_j,'Value',1)
     862%      scan_j_Callback([],[], handles);
     863% end
     864% set(handles.scan_j,'Visible',state_j)
     865% set(handles.j1,'Visible',state_j)
     866% set(handles.j2,'Visible',state_j)
     867% set(handles.last_j,'Visible',state_j);
     868% set(handles.frame_j,'Visible',state_j);
     869% set(handles.j_text,'Visible',state_j);
     870% if ~isempty(i2_series)||~isempty(j2_series)
     871%     set(handles.CheckFixPair,'Visible','on')
     872% elseif index==1
     873%     set(handles.CheckFixPair,'Visible','off')
     874% end
     875%
     876%
     877% mode_Callback(hObject, eventdata, handles)
     878%
     879% set(handles.REFRESH_INDICES,'BackgroundColor',[0.7 0.7 0.7])
     880% InputTable=get(handles.InputTable,'Data');
     881% check_lines=get(handles.REFRESH_INDICES,'UserData');
     882%
     883% %% check the indices and FileTypes for each series (limited to the new ones to save time)
     884% for ind_list=1:length(check_lines)
     885%     if  check_lines(ind_list)
     886%         InputLine=InputTable(ind_list,:);
     887%         detect_idem=strcmp('"',InputLine);% look for '" (repeat of previous data)
     888%         detect_idem=detect_idem(detect_idem>0);
     889%         if ~isempty (detect_idem)
     890%             InputLine(detect_idem)=InputTable(ind_list-1,detect_idem);
     891%             set(handles.InputTable,'Data',InputTable)
     892%         end
     893%         fileinput=fullfile_uvmat(InputLine{1},InputLine{2},InputLine{3},InputLine{5},InputLine{4},1,2,1,2);
     894%         %fileinput=name_generator(fullfile(InputLine{1},InputLine{3}),1,1,InputLine{5},InputLine{4},1,2,2,InputLine{2})
     895%         %update file series defined by the selected line
     896%         [InputTable{ind_list,3},InputTable{(ind_list),4},errormsg]=update_indices(handles,fileinput,ind_list);
     897%         if ~isempty(errormsg)
     898%                 msgbox_uvmat('ERROR',errormsg)
     899%                 return
     900%         end
     901%     end
     902% end
     903% set(handles.InputTable,'Data',InputTable)
     904% SeriesData=get(handles.series,'UserData');
     905%
     906% state_j='off';
     907% state_Pairs='off';
     908% state_InputFields='off';
     909% val=get(handles.ListView,'Value');
     910% ListViewString={''};
     911% if ~isempty(SeriesData)
     912% %     ListViewString={};
     913%     for iview=1:size(InputTable,1)
     914%         if ~isempty(SeriesData.j1_series{iview})
     915%             state_j='on';
     916%         end
     917%         if ~isempty(SeriesData.i2_series{iview})||~isempty(SeriesData.j2_series{iview})
     918%             state_Pairs='on';
     919%             ListViewString{iview}=num2str(iview);
     920%             if check_lines(iview)
     921%                 val=iview;%select the last pair if it is a new entry
     922%             end
     923%         end
     924%         if strcmp(SeriesData.FileType{iview},'civx')||strcmp(SeriesData.FileType{iview},'civdata')
     925%             state_InputFields='on';
     926%         end
     927%     end
     928% end
     929% set(handles.ListView,'Value',val)
     930% set(handles.ListView,'String',ListViewString)
     931% if strcmp(state_Pairs,'on')
     932%     ListView_Callback(hObject,eventdata,handles)
     933% end
     934% set(handles.PairString,'Visible',state_Pairs)
     935% enable_j(handles,state_j)
    926936
    927937%------------------------------------------------------------------------
     
    12801290  %Series.Specific=h_fun(Series);   
    12811291   Series=h_fun(Series); 
     1292   if ~isempty(filexml)
    12821293   t=struct2xml(Series);
    12831294    t=set(t,1,'name','Series');
    12841295    save(t,filexml);
     1296   end
    12851297%     h_fun(Series);
    12861298end
     
    13091321end
    13101322% update the xml file after interactive input with the function
    1311 Series.Specific=h_fun('input?');   
     1323Series.Specific='?';
     1324Series=h_fun(Series);   
    13121325t=struct2xml(Series);
    13131326t=set(t,1,'name','Series');
     
    13351348if isunix
    13361349    system(['chmod +x ' filename_bat]);% set the file to executable
    1337     system(['. ' filename_bat]);%execute fct
     1350    system(['. ' filename_bat ' &']);%execute fct
     1351else
     1352    system(filename_bat);
    13381353end
    13391354set(handles.BATCH, 'Enable','On')
  • trunk/src/uvmat.m

    r456 r460  
    228228
    229229%% set functions for the mouse and keyboard
    230 % set(handles.histo_u,'NextPlot','replacechildren');
    231 % set(handles.histo_v,'NextPlot','replacechildren');
    232230set(hObject,'KeyPressFcn',{'keyboard_callback',handles})%set keyboard action function
    233231set(hObject,'WindowButtonMotionFcn',{'mouse_motion',handles})%set mouse action functio
     
    237235
    238236%% refresh projection plane
    239 % UvData.Object{1}.ProjMode='projection';%main plotting plane
    240 % UvData.Object{1}.DisplayHandle.uvmat=handles.axes3;
    241 % UvData.Object{1}.DisplayHandle.view_field=[];
    242237set(handles.ListObject,'Value',1)% default: empty projection objectproj_field
    243238set(handles.ListObject,'String',{'plane'})
     
    306301Field=[];
    307302if exist('input','var')
    308 %     if ~isempty(errormsg)
    309 %         msgbox_uvmat('WARNING',errormsg)
    310 %     end
    311303    if ishandle(handles.UVMAT_title)
    312304        delete(handles.UVMAT_title)
     
    921913    if ~exist(filexml,'file')
    922914        filexml=fullfile(RootPath,SubDir,[RootFile '.civ']); % very old convention: .civ file
    923         if ~exist(filexml,'file')
     915        if exist(filexml,'file')
    924916            DocExt='.civ';
    925917        else
Note: See TracChangeset for help on using the changeset viewer.