Changeset 180 for trunk/src/civ.m


Ignore:
Timestamp:
Jan 18, 2011, 10:50:40 PM (13 years ago)
Author:
sommeria
Message:

rationalisation of uvmat, introduction of the new function read_field, links with get_field, several bug repairs

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/civ.m

    r179 r180  
    15981598box_test(5)=get(handles.FIX2,'Value');
    15991599box_test(6)=get(handles.PATCH2,'Value');
    1600 index=find(box_test==1);
    1601 if isempty(index)
     1600index_first=find(box_test==1,1);
     1601if isempty(index_first)
    16021602    msgbox_uvmat('ERROR','no selected operation')
    16031603    return
    16041604end
    1605 index_first=min(index);
    1606 index_last=max(index);
     1605index_last=find(box_test==1,1,'last');
    16071606box_used=box_test(index_first : index_last);
    16081607[box_missing,ind_missing]=min(box_used);
    1609 if isequal(box_missing,0)
     1608if isequal(box_missing,0); %there is a missing step in the sequence of operations
    16101609    msgbox_uvmat('ERROR',['missing' cell2mat(operations(ind_missing))]);
    16111610    return
     
    16401639%% reinitialise status callback
    16411640if isfield(handles,'status')
    1642 set(handles.status,'Value',0);%suppress status display
    1643 status_Callback(hObject, eventdata, handles)
     1641    set(handles.status,'Value',0);%suppress status display
     1642    status_Callback(hObject, eventdata, handles)
    16441643end
    16451644
    16461645%% set the list of files and check them
    16471646display('checking the files...')
    1648 %compare=get(handles.compare,'Value');%test for usual PIV (compare=1) or displacement (=2) or stereo PIV (=3)
    16491647[filecell,num1_civ1,num2_civ1,num_a_civ1,num_b_civ1,num1_civ2,num2_civ2,num_a_civ2,num_b_civ2,nom_type_nc]=...
    16501648    set_civ_filenames(handles,box_test);
     
    46234621box_test(4)=get(handles.CIV2,'Value');
    46244622box_test(5)=get(handles.FIX2,'Value');
    4625 box_test(6)=get(handles.PATCH2,'Value')
    4626 find(box_test)
    4627 option_civ=max(find(box_test))
     4623box_test(6)=get(handles.PATCH2,'Value');
     4624option_civ=find(box_test,1,'last');%last selected option (non-zero index of box_test)
    46284625filecell=get(handles.civ,'UserData');
    46294626if ~isfield(filecell,'nc')
Note: See TracChangeset for help on using the changeset viewer.