Changeset 36 for trunk/src/civ.m


Ignore:
Timestamp:
Mar 5, 2010, 11:23:19 PM (11 years ago)
Author:
sommeria
Message:

-get_field: functions called by ACTION in the GUI get_field put in the subdirectory get_field (like for series)
-help put in the subdir uvmat_doc, help call in uvmat, civ, geometry calib modified accordingly

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/civ.m

    r16 r36  
    13151315    find_pair_indices(handles,mode)
    13161316%------------------------------------------------------------------------
    1317 first_i=str2num(get(handles.first_i,'String'));
    1318 last_i=str2num(get(handles.last_i,'String'));
    1319 incr=str2num(get(handles.incr_i,'String'));
    1320 num1=[first_i:incr:last_i];
     1317first_i=str2num(get(handles.first_i,'String'));%first index i
     1318last_i=str2num(get(handles.last_i,'String'));%last index i
     1319incr=str2num(get(handles.incr_i,'String'));% increment
     1320num1=[first_i:incr:last_i];% list of i indices (reference values for each pair)
    13211321if isequal(get(handles.first_j,'Visible'),'on')
    1322     first_j=str2num(get(handles.first_j,'String'));
    1323     last_j=str2num(get(handles.last_j,'String'));
    1324     incr_j=str2num(get(handles.incr_j,'String'));
     1322    first_j=str2num(get(handles.first_j,'String'));%first index j
     1323    last_j=str2num(get(handles.last_j,'String'));%last index j
     1324    incr_j=str2num(get(handles.incr_j,'String'));% increment
    13251325else
    13261326    first_j=1;
     
    13281328    incr_j=1;
    13291329end
    1330 num_j=[first_j:incr_j:last_j];
     1330num_j=[first_j:incr_j:last_j];% list of j indices (reference values for each pair)
    13311331list_civ1=get(handles.list_pair_civ1,'String');
    13321332index_civ1=get(handles.list_pair_civ1,'Value');
    1333 str_civ1=list_civ1{index_civ1};
     1333str_civ1=list_civ1{index_civ1};%string defining the image pairs for civ1
    13341334if isempty(str_civ1)||isequal(str_civ1,'')
    13351335    msgbox_uvmat('ERROR','no image pair selected for civ1')
     
    13421342    index_civ2=index_civ1;
    13431343end
    1344 str_civ2=list_civ2{index_civ2};
    1345 if isequal(first_i,[])|isequal(first_j,[]), errordlg('first field number not defined'),...
    1346     set(handles.RUN, 'Enable','On'), set(handles.RUN,'BackgroundColor',[1 0 0]),return,end;
    1347 if isequal(last_i,[])| isequal(last_j,[]),errordlg('last field number not defined'),...
    1348     set(handles.RUN, 'Enable','On'), set(handles.RUN,'BackgroundColor',[1 0 0]),return,end;
    1349 if isequal(incr,[])| isequal(incr_j,[]),errordlg('increment in field number not defined'),...
    1350     set(handles.RUN, 'Enable','On'), set(handles.RUN,'BackgroundColor',[1 0 0]),return,end;
    1351 if last_i < first_i | last_j < first_j , errordlg('last field number must be larger than the first one'),...
    1352     set(handles.RUN, 'Enable','On'), set(handles.RUN,'BackgroundColor',[1 0 0]),return,end;
    1353 if isequal (mode,'series(Di)')% |isequal(mode,'st_series(Di)')   
     1344str_civ2=list_civ2{index_civ2};%string defining the image pairs for civ2
     1345if isempty(first_i)||isempty(first_j), msgbox_uvmat('ERROR','first field number not defined'),...
     1346    return,end;
     1347if isequal(last_i,[])| isequal(last_j,[]),msgbox_uvmat('ERROR','last field number not defined'),...
     1348    return,end;
     1349if isequal(incr,[])| isequal(incr_j,[]),msgbox_uvmat('ERROR','increment in field number not defined'),...
     1350    return,end;
     1351if last_i < first_i | last_j < first_j , msgbox_uvmat('ERROR','last field number must be larger than the first one'),...
     1352    return,end;
     1353if isequal (mode,'series(Di)')
    13541354     %recognize the pair civ1 from the display
    13551355        indsel=find((double(str_civ1)<48)|(double(str_civ1)>57));% character indices of non numerical characters
     
    14081408        num2_civ2=num2_civ2(indsel);
    14091409    end
    1410 elseif isequal (mode,'series(Dj)')%|isequal (mode,'st_series(Dj)')
     1410elseif isequal (mode,'series(Dj)')
    14111411    lastfield_j=str2num(get(handles.nb_field2,'String'));
    14121412    num1_civ1=num1;% set of first image numbers
     
    14351435        num_b_civ2=num_b_civ2(indsel);
    14361436    end
    1437 elseif isequal(mode,'pair j1-j2')% | isequal(mode,'st_pair j1-j2') %case of bursts (png_old or png_2D)
     1437elseif isequal(mode,'pair j1-j2') %case of bursts (png_old or png_2D)
    14381438    num1_civ1=num1;
    14391439    num1_civ2=num1;
     
    14551455    num_b_civ2=num_j;
    14561456end
     1457'TESTfind'
     1458num1_civ1
     1459num2_civ1
     1460num_a_civ1
     1461num_b_civ1
    14571462
    14581463%------------------------------------------------------------------------
     
    16591664[filecell,num1_civ1,num2_civ1,num_a_civ1,num_b_civ1,num1_civ2,num2_civ2,num_a_civ2,num_b_civ2,nom_type_nc,file_ref_fix1,file_ref_fix2]=...
    16601665       set_civ_filenames(handles,compare,box_test);
     1666   'TESTnbre_RUN'
     1667nbfield=size(num1_civ1,2)
     1668nbslice=size(num1_civ1,1)
     1669
    16611670if isempty(filecell)
    16621671   set(handles.RUN, 'Enable','On')
     
    21762185       set_civ_filenames(handles,compare,box_test);
    21772186display('files OK, processing...') 
    2178 nbfield=size(num1_civ1,2);
    2179 nbslice=size(num1_civ1,1);
     2187'TESTnbre'
     2188nbfield=size(num1_civ1,2)
     2189nbslice=size(num1_civ1,1)
    21802190
    21812191%GET PARAMETERS:
     
    35043514                textout=char(textcmx);
    35053515%               dlmwrite(filename_cmx,textout,'');
    3506        
    3507         filename_ima
    3508         filename_ima_1
    35093516     fid=fopen([filename_cmx],'w');
    35103517fprintf(fid, ['##############   CMX file' '\n']);
     
    49564963path_to_uvmat=which ('uvmat');% check the path of uvmat
    49574964pathelp=fileparts(path_to_uvmat);
    4958 helpfile=fullfile(pathelp,'UVMAT_DOC','uvmat_doc.html');
    4959 if isempty(dir(helpfile)), errordlg('Please put the help file uvmat_doc.html in the directory UVMAT/UVMAT_DOC')
    4960 else
    4961 web([helpfile '#civ'])   
     4965helpfile=fullfile(pathelp,'uvmat_doc','uvmat_doc.html');
     4966if isempty(dir(helpfile)), msgbox_uvmat('ERROR','Please put the help file uvmat_doc.html in the sub-directory /uvmat_doc of the UVMAT package')
     4967else
     4968    addpath (fullfile(pathelp,'uvmat_doc'))
     4969    web([helpfile '#civ'])   
    49624970end
    49634971
Note: See TracChangeset for help on using the changeset viewer.