Changeset 36


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

Location:
trunk/src
Files:
4 added
6 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
  • trunk/src/geometry_calib.m

    r17 r36  
    146146
    147147%case of calibration (ImaDoc) input file
    148 hcalib=get(handles.calib_type,'parent');
    149 CalibData=get(hcalib,'UserData');
     148% hcalib=get(handles.calib_type,'parent');
     149CalibData=get(handles.figure1,'UserData');
    150150CalibData.XmlInput=fileinput;
    151151if isfield(s,'Heading')
     
    153153end
    154154
    155 set(hcalib,'UserData',CalibData);%store the heading in the interface 'UserData'
     155set(handles.figure1,'UserData',CalibData);%store the heading in the interface 'UserData'
    156156if isfield(s,'GeometryCalib')
    157157    Calib=s.GeometryCalib;
     
    412412end
    413413if testinput
    414     outcome=dataview(XmlInput,SubCampaignTest,GeometryCalib)
     414    outcome=dataview(XmlInput,SubCampaignTest,GeometryCalib);
    415415end
    416416%     %A COMPLETER
     
    10141014path_to_uvmat=which ('uvmat');% check the path of uvmat
    10151015pathelp=fileparts(path_to_uvmat);
    1016     helpfile=fullfile(pathelp,'UVMAT_DOC','uvmat_doc.html');
    1017 if isempty(dir(helpfile)), warndlg_uvmat('The help file uvmat_doc.html needs to be put in the directory UVMAT/UVMAT_DOC','ERROR')
     1016    helpfile=fullfile(pathelp,'uvmat_doc','uvmat_doc.html');
     1017if isempty(dir(helpfile)), msgbox_uvmat('ERROR','Please put the help file uvmat_doc.html in the sub-directory /uvmat_doc of the UVMAT package')
    10181018else
     1019   addpath (fullfile(pathelp,'uvmat_doc'))
    10191020   web([helpfile '#geometry_calib'])
    10201021end
     
    10231024function MenuCreateGrid_Callback(hObject, eventdata, handles)
    10241025%------------------------------------------------------------------------
    1025 hcalib=get(handles.calib_type,'parent');%handles of the GUI geometry_calib
    1026 CalibData=get(hcalib,'UserData');
     1026%hcalib=get(handles.calib_type,'parent');%handles of the GUI geometry_calib
     1027CalibData=get(handles.figure1,'UserData');
    10271028Tinput=[];%default
    10281029if isfield(CalibData,'grid')
    10291030    Tinput=CalibData.grid;
    10301031end
    1031 T=create_grid(Tinput)%display the GUI create_grid
     1032T=create_grid(Tinput);%display the GUI create_grid
    10321033CalibData.grid=T;
    1033 set(hcalib,'UserData',CalibData)
     1034set(handles.figure1,'UserData',CalibData)
    10341035
    10351036%grid in phys space
    10361037Coord_cell=get(handles.ListCoord,'String');
    1037 data=read_geometry_calib(Coord_cell)
     1038data=read_geometry_calib(Coord_cell);
    10381039nbpoints=size(data.Coord,1); %nbre of calibration points
    1039 data.Coord(1:size(T,1),1:3)=T;
     1040data.Coord(1:size(T,1),1:3)=T;%update the existing list of phys coordinates from the GUI create_grid
    10401041for i=1:nbpoints
    10411042   for j=1:5
     
    10611062function MenuTranslatePoints_Callback(hObject, eventdata, handles)
    10621063%-----------------------------------------------------------------------
    1063 hcalib=get(handles.calib_type,'parent');%handles of the GUI geometry_calib
    1064 CalibData=get(hcalib,'UserData')
     1064%hcalib=get(handles.calib_type,'parent');%handles of the GUI geometry_calib
     1065CalibData=get(handles.figure1,'UserData');
    10651066Tinput=[];%default
    10661067if isfield(CalibData,'translate')
     
    10691070T=translate_points(Tinput);%display translate_points GUI and get shift parameters
    10701071CalibData.translate=T;
    1071 set(hcalib,'UserData',CalibData)
     1072set(handles.figure1,'UserData',CalibData)
    10721073%translation
    10731074Coord_cell=get(handles.ListCoord,'String');
     
    10891090% --------------------------------------------------------------------
    10901091function MenuRotatePoints_Callback(hObject, eventdata, handles)
    1091 hcalib=get(handles.calib_type,'parent');%handles of the GUI geometry_calib
    1092 CalibData=get(hcalib,'UserData')
     1092%hcalib=get(handles.calib_type,'parent');%handles of the GUI geometry_calib
     1093CalibData=get(handles.figure1,'UserData');
    10931094Tinput=[];%default
    10941095if isfield(CalibData,'rotate')
     
    10971098T=rotate_points(Tinput);%display translate_points GUI and get shift parameters
    10981099CalibData.rotate=T;
    1099 set(hcalib,'UserData',CalibData)
     1100set(handles.figure1,'UserData',CalibData)
    11001101%-----------------------------------------------------
    11011102%rotation
  • trunk/src/read_geometry_calib.m

    r29 r36  
    1818nb_defining_points=length(Coord_cell);
    1919iline=0;
     20data.Coord=[];%default
    2021for i=1:nb_defining_points
    2122    coord_str=Coord_cell{i};%character string of line number i
  • trunk/src/series.m

    r34 r36  
    21612161     get_field(filename)
    21622162
    2163 
    2164 
    21652163% --------------------------------------------------------------------
    21662164function MenuHelp_Callback(hObject, eventdata, handles)
     
    21682166path_to_uvmat=which ('uvmat');% check the path of uvmat
    21692167pathelp=fileparts(path_to_uvmat);
    2170 helpfile=fullfile(pathelp,'UVMAT_DOC','uvmat_doc.html');
    2171 if isempty(dir(helpfile)), errordlg('Please put the help file uvmat_doc.html in the  directory UVMAT/UVMAT_DOC')
    2172 else
    2173 web([helpfile '#series'])   
    2174 end
    2175 
    2176 
    2177 
    2178 
    2179 
    2180 
     2168helpfile=fullfile(pathelp,'uvmat_doc','uvmat_doc.html');
     2169if isempty(dir(helpfile)), msgbox_uvmat('ERROR','Please put the help file uvmat_doc.html in the sub-directory /uvmat_doc of the UVMAT package')
     2170else
     2171    addpath (fullfile(pathelp,'uvmat_doc'))
     2172    web([helpfile '#series'])
     2173end
     2174
     2175
     2176
     2177
     2178
     2179
  • trunk/src/translate_points.m

    r12 r36  
    3636end
    3737% End initialization code - DO NOT EDIT
     38
    3839
    3940% --- Executes just before translate_points is made visible.
     
    129130function Cancel_Callback(hObject, eventdata, handles)
    130131handles.output = get(hObject,'String');
    131 %handles.output = 'Cancel'
    132132guidata(hObject, handles); % Update handles structure
    133 % Use UIRESUME instead of delete because the OutputFcn needs
    134 % to get the updated handles structure.
    135133uiresume(handles.figure1);
    136134
     
    163161
    164162
    165 function edit5_Callback(hObject, eventdata, handles)
    166 % hObject    handle to edit5 (see GCBO)
    167 % eventdata  reserved - to be defined in a future version of MATLAB
    168 % handles    structure with handles and user data (see GUIDATA)
    169 
    170 % Hints: get(hObject,'String') returns contents of edit5 as text
    171 %        str2double(get(hObject,'String')) returns contents of edit5 as a double
    172 
    173 
    174 
    175 function edit6_Callback(hObject, eventdata, handles)
    176 % hObject    handle to edit6 (see GCBO)
    177 % eventdata  reserved - to be defined in a future version of MATLAB
    178 % handles    structure with handles and user data (see GUIDATA)
    179 
    180 % Hints: get(hObject,'String') returns contents of edit6 as text
    181 %        str2double(get(hObject,'String')) returns contents of edit6 as a
    182 %        double
    183 
    184 
    185 function edit7_Callback(hObject, eventdata, handles)
    186 % hObject    handle to edit7 (see GCBO)
    187 % eventdata  reserved - to be defined in a future version of MATLAB
    188 % handles    structure with handles and user data (see GUIDATA)
    189 
    190 % Hints: get(hObject,'String') returns contents of edit7 as text
    191 %        str2double(get(hObject,'String')) returns contents of edit7 as a double
    192 
    193 
    194 function edit8_Callback(hObject, eventdata, handles)
    195 % hObject    handle to edit8 (see GCBO)
    196 % eventdata  reserved - to be defined in a future version of MATLAB
    197 % handles    structure with handles and user data (see GUIDATA)
    198 
    199 % Hints: get(hObject,'String') returns contents of edit8 as text
    200 %        str2double(get(hObject,'String')) returns contents of edit8 as a double
    201 
    202 
  • trunk/src/uvmat.m

    r34 r36  
    45084508path_to_uvmat=which ('uvmat');% check the path of uvmat
    45094509pathelp=fileparts(path_to_uvmat);
    4510 helpfile=fullfile(pathelp,'UVMAT_DOC','uvmat_doc.html');
    4511 if isempty(dir(helpfile)), errordlg('Please put the help file uvmat_doc.html in the directory UVMAT/UVMAT_DOC')
    4512 else
     4510helpfile=fullfile(pathelp,'uvmat_doc','uvmat_doc.html');
     4511if isempty(dir(helpfile)), msgbox_uvmat('ERROR','Please put the help file uvmat_doc.html in the sub-directory /uvmat_doc of the UVMAT package')
     4512else
     4513    addpath (fullfile(pathelp,'uvmat_doc'))
    45134514    web(helpfile);
    45144515end
Note: See TracChangeset for help on using the changeset viewer.