Changeset 603 for trunk/src/series.m


Ignore:
Timestamp:
Apr 4, 2013, 12:08:47 PM (8 years ago)
Author:
sommeria
Message:

bugs corrected, improvement of civ_input GUI

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/series.m

    r602 r603  
    542542
    543543%% determine the selected reference field indices for pair display
    544 ref_i=1; %default ref_i is a reference frame index used to find existing pairs from PIV
    545 if ~isempty(i1)
    546     ref_i=i1;
    547     if ~isempty(i2)
    548         ref_i=floor((ref_i+i2)/2);% reference image number corresponding to the file
    549     end
    550 end
     544if isempty(i1)
     545    i1=1;
     546end
     547if isempty(i2)
     548    i2=i1;
     549end
     550ref_i=floor((i1+i2)/2);% reference image number corresponding to the file
    551551set(handles.num_ref_i,'String',num2str(ref_i));
    552 ref_j=1; %default  ref_j is a reference frame index used to find existing pairs from PIV
    553 if ~isempty(j1)
    554     ref_j=j1;
    555     if ~isempty(j2)
    556         ref_j=floor((j1+j2)/2);
    557     end         
    558 end
     552set(handles.num_ref_i,'UserData',[i1 i2])
     553if isempty(j1)
     554    j1=1;
     555end
     556if isempty(j2)
     557    j2=j1;
     558end
     559ref_j=floor((j1+j2)/2);% reference image number corresponding to the file
    559560set(handles.num_ref_j,'String',num2str(ref_j));
     561set(handles.num_ref_j,'UserData',[j1 j2])
    560562
    561563%% update the list of recent files in the menubar and save it for future opening
     
    793795%% update the series info in 'UserData'
    794796SeriesData=get(handles.series,'UserData');
     797SeriesData.Ref_i{iview}=get(handles.num_ref_i,'UserData');
     798SeriesData.Ref_j{iview}=get(handles.num_ref_j,'UserData');
    795799SeriesData.i1_series{iview}=i1_series;
    796800SeriesData.i2_series{iview}=i2_series;
     
    23672371commandwindow; %brings the Matlab command window to the front
    23682372
     2373
     2374% --------------------------------------------------------------------
     2375function MenuImportConfig_Callback(hObject, eventdata, handles)
     2376% --------------------------------------------------------------------
     2377InputTable=get(handles.InputTable,'Data');
     2378[FileName, PathName] = uigetfile( ...
     2379       {'*.xml', ' (*.xml)';
     2380       '*.xml',  '.xml files '; ...
     2381        '*.*',  'All Files (*.*)'}, ...
     2382        'Pick a file',InputTable{1,1});
     2383filexml=[PathName FileName];%complete file name
     2384if isempty(filexml),return;end %abandon if no file is introduced by the browser
     2385Param=xml2struct(filexml);
     2386fill_GUI(Param,handles.series)
    23692387
    23702388% --- Executes on selection change in RunMode.
Note: See TracChangeset for help on using the changeset viewer.