- Timestamp:
- Mar 5, 2010, 11:23:19 PM (15 years ago)
- Location:
- trunk/src
- Files:
-
- 4 added
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/civ.m
r16 r36 1315 1315 find_pair_indices(handles,mode) 1316 1316 %------------------------------------------------------------------------ 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]; 1317 first_i=str2num(get(handles.first_i,'String'));%first index i 1318 last_i=str2num(get(handles.last_i,'String'));%last index i 1319 incr=str2num(get(handles.incr_i,'String'));% increment 1320 num1=[first_i:incr:last_i];% list of i indices (reference values for each pair) 1321 1321 if 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 1325 1325 else 1326 1326 first_j=1; … … 1328 1328 incr_j=1; 1329 1329 end 1330 num_j=[first_j:incr_j:last_j]; 1330 num_j=[first_j:incr_j:last_j];% list of j indices (reference values for each pair) 1331 1331 list_civ1=get(handles.list_pair_civ1,'String'); 1332 1332 index_civ1=get(handles.list_pair_civ1,'Value'); 1333 str_civ1=list_civ1{index_civ1}; 1333 str_civ1=list_civ1{index_civ1};%string defining the image pairs for civ1 1334 1334 if isempty(str_civ1)||isequal(str_civ1,'') 1335 1335 msgbox_uvmat('ERROR','no image pair selected for civ1') … … 1342 1342 index_civ2=index_civ1; 1343 1343 end 1344 str_civ2=list_civ2{index_civ2}; 1345 if ise qual(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)')1344 str_civ2=list_civ2{index_civ2};%string defining the image pairs for civ2 1345 if isempty(first_i)||isempty(first_j), msgbox_uvmat('ERROR','first field number not defined'),... 1346 return,end; 1347 if isequal(last_i,[])| isequal(last_j,[]),msgbox_uvmat('ERROR','last field number not defined'),... 1348 return,end; 1349 if isequal(incr,[])| isequal(incr_j,[]),msgbox_uvmat('ERROR','increment in field number not defined'),... 1350 return,end; 1351 if last_i < first_i | last_j < first_j , msgbox_uvmat('ERROR','last field number must be larger than the first one'),... 1352 return,end; 1353 if isequal (mode,'series(Di)') 1354 1354 %recognize the pair civ1 from the display 1355 1355 indsel=find((double(str_civ1)<48)|(double(str_civ1)>57));% character indices of non numerical characters … … 1408 1408 num2_civ2=num2_civ2(indsel); 1409 1409 end 1410 elseif isequal (mode,'series(Dj)') %|isequal (mode,'st_series(Dj)')1410 elseif isequal (mode,'series(Dj)') 1411 1411 lastfield_j=str2num(get(handles.nb_field2,'String')); 1412 1412 num1_civ1=num1;% set of first image numbers … … 1435 1435 num_b_civ2=num_b_civ2(indsel); 1436 1436 end 1437 elseif isequal(mode,'pair j1-j2') % | isequal(mode,'st_pair j1-j2')%case of bursts (png_old or png_2D)1437 elseif isequal(mode,'pair j1-j2') %case of bursts (png_old or png_2D) 1438 1438 num1_civ1=num1; 1439 1439 num1_civ2=num1; … … 1455 1455 num_b_civ2=num_j; 1456 1456 end 1457 'TESTfind' 1458 num1_civ1 1459 num2_civ1 1460 num_a_civ1 1461 num_b_civ1 1457 1462 1458 1463 %------------------------------------------------------------------------ … … 1659 1664 [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]=... 1660 1665 set_civ_filenames(handles,compare,box_test); 1666 'TESTnbre_RUN' 1667 nbfield=size(num1_civ1,2) 1668 nbslice=size(num1_civ1,1) 1669 1661 1670 if isempty(filecell) 1662 1671 set(handles.RUN, 'Enable','On') … … 2176 2185 set_civ_filenames(handles,compare,box_test); 2177 2186 display('files OK, processing...') 2178 nbfield=size(num1_civ1,2); 2179 nbslice=size(num1_civ1,1); 2187 'TESTnbre' 2188 nbfield=size(num1_civ1,2) 2189 nbslice=size(num1_civ1,1) 2180 2190 2181 2191 %GET PARAMETERS: … … 3504 3514 textout=char(textcmx); 3505 3515 % dlmwrite(filename_cmx,textout,''); 3506 3507 filename_ima3508 filename_ima_13509 3516 fid=fopen([filename_cmx],'w'); 3510 3517 fprintf(fid, ['############## CMX file' '\n']); … … 4956 4963 path_to_uvmat=which ('uvmat');% check the path of uvmat 4957 4964 pathelp=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']) 4965 helpfile=fullfile(pathelp,'uvmat_doc','uvmat_doc.html'); 4966 if isempty(dir(helpfile)), msgbox_uvmat('ERROR','Please put the help file uvmat_doc.html in the sub-directory /uvmat_doc of the UVMAT package') 4967 else 4968 addpath (fullfile(pathelp,'uvmat_doc')) 4969 web([helpfile '#civ']) 4962 4970 end 4963 4971 -
trunk/src/geometry_calib.m
r17 r36 146 146 147 147 %case of calibration (ImaDoc) input file 148 hcalib=get(handles.calib_type,'parent');149 CalibData=get(h calib,'UserData');148 % hcalib=get(handles.calib_type,'parent'); 149 CalibData=get(handles.figure1,'UserData'); 150 150 CalibData.XmlInput=fileinput; 151 151 if isfield(s,'Heading') … … 153 153 end 154 154 155 set(h calib,'UserData',CalibData);%store the heading in the interface 'UserData'155 set(handles.figure1,'UserData',CalibData);%store the heading in the interface 'UserData' 156 156 if isfield(s,'GeometryCalib') 157 157 Calib=s.GeometryCalib; … … 412 412 end 413 413 if testinput 414 outcome=dataview(XmlInput,SubCampaignTest,GeometryCalib) 414 outcome=dataview(XmlInput,SubCampaignTest,GeometryCalib); 415 415 end 416 416 % %A COMPLETER … … 1014 1014 path_to_uvmat=which ('uvmat');% check the path of uvmat 1015 1015 pathelp=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'); 1017 if isempty(dir(helpfile)), msgbox_uvmat('ERROR','Please put the help file uvmat_doc.html in the sub-directory /uvmat_doc of the UVMAT package') 1018 1018 else 1019 addpath (fullfile(pathelp,'uvmat_doc')) 1019 1020 web([helpfile '#geometry_calib']) 1020 1021 end … … 1023 1024 function MenuCreateGrid_Callback(hObject, eventdata, handles) 1024 1025 %------------------------------------------------------------------------ 1025 hcalib=get(handles.calib_type,'parent');%handles of the GUI geometry_calib1026 CalibData=get(h calib,'UserData');1026 %hcalib=get(handles.calib_type,'parent');%handles of the GUI geometry_calib 1027 CalibData=get(handles.figure1,'UserData'); 1027 1028 Tinput=[];%default 1028 1029 if isfield(CalibData,'grid') 1029 1030 Tinput=CalibData.grid; 1030 1031 end 1031 T=create_grid(Tinput) %display the GUI create_grid1032 T=create_grid(Tinput);%display the GUI create_grid 1032 1033 CalibData.grid=T; 1033 set(h calib,'UserData',CalibData)1034 set(handles.figure1,'UserData',CalibData) 1034 1035 1035 1036 %grid in phys space 1036 1037 Coord_cell=get(handles.ListCoord,'String'); 1037 data=read_geometry_calib(Coord_cell) 1038 data=read_geometry_calib(Coord_cell); 1038 1039 nbpoints=size(data.Coord,1); %nbre of calibration points 1039 data.Coord(1:size(T,1),1:3)=T; 1040 data.Coord(1:size(T,1),1:3)=T;%update the existing list of phys coordinates from the GUI create_grid 1040 1041 for i=1:nbpoints 1041 1042 for j=1:5 … … 1061 1062 function MenuTranslatePoints_Callback(hObject, eventdata, handles) 1062 1063 %----------------------------------------------------------------------- 1063 hcalib=get(handles.calib_type,'parent');%handles of the GUI geometry_calib1064 CalibData=get(h calib,'UserData')1064 %hcalib=get(handles.calib_type,'parent');%handles of the GUI geometry_calib 1065 CalibData=get(handles.figure1,'UserData'); 1065 1066 Tinput=[];%default 1066 1067 if isfield(CalibData,'translate') … … 1069 1070 T=translate_points(Tinput);%display translate_points GUI and get shift parameters 1070 1071 CalibData.translate=T; 1071 set(h calib,'UserData',CalibData)1072 set(handles.figure1,'UserData',CalibData) 1072 1073 %translation 1073 1074 Coord_cell=get(handles.ListCoord,'String'); … … 1089 1090 % -------------------------------------------------------------------- 1090 1091 function MenuRotatePoints_Callback(hObject, eventdata, handles) 1091 hcalib=get(handles.calib_type,'parent');%handles of the GUI geometry_calib1092 CalibData=get(h calib,'UserData')1092 %hcalib=get(handles.calib_type,'parent');%handles of the GUI geometry_calib 1093 CalibData=get(handles.figure1,'UserData'); 1093 1094 Tinput=[];%default 1094 1095 if isfield(CalibData,'rotate') … … 1097 1098 T=rotate_points(Tinput);%display translate_points GUI and get shift parameters 1098 1099 CalibData.rotate=T; 1099 set(h calib,'UserData',CalibData)1100 set(handles.figure1,'UserData',CalibData) 1100 1101 %----------------------------------------------------- 1101 1102 %rotation -
trunk/src/read_geometry_calib.m
r29 r36 18 18 nb_defining_points=length(Coord_cell); 19 19 iline=0; 20 data.Coord=[];%default 20 21 for i=1:nb_defining_points 21 22 coord_str=Coord_cell{i};%character string of line number i -
trunk/src/series.m
r34 r36 2161 2161 get_field(filename) 2162 2162 2163 2164 2165 2163 % -------------------------------------------------------------------- 2166 2164 function MenuHelp_Callback(hObject, eventdata, handles) … … 2168 2166 path_to_uvmat=which ('uvmat');% check the path of uvmat 2169 2167 pathelp=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 2168 helpfile=fullfile(pathelp,'uvmat_doc','uvmat_doc.html'); 2169 if isempty(dir(helpfile)), msgbox_uvmat('ERROR','Please put the help file uvmat_doc.html in the sub-directory /uvmat_doc of the UVMAT package') 2170 else 2171 addpath (fullfile(pathelp,'uvmat_doc')) 2172 web([helpfile '#series']) 2173 end 2174 2175 2176 2177 2178 2179 -
trunk/src/translate_points.m
r12 r36 36 36 end 37 37 % End initialization code - DO NOT EDIT 38 38 39 39 40 % --- Executes just before translate_points is made visible. … … 129 130 function Cancel_Callback(hObject, eventdata, handles) 130 131 handles.output = get(hObject,'String'); 131 %handles.output = 'Cancel'132 132 guidata(hObject, handles); % Update handles structure 133 % Use UIRESUME instead of delete because the OutputFcn needs134 % to get the updated handles structure.135 133 uiresume(handles.figure1); 136 134 … … 163 161 164 162 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 MATLAB168 % handles structure with handles and user data (see GUIDATA)169 170 % Hints: get(hObject,'String') returns contents of edit5 as text171 % str2double(get(hObject,'String')) returns contents of edit5 as a double172 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 MATLAB178 % handles structure with handles and user data (see GUIDATA)179 180 % Hints: get(hObject,'String') returns contents of edit6 as text181 % str2double(get(hObject,'String')) returns contents of edit6 as a182 % double183 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 MATLAB188 % handles structure with handles and user data (see GUIDATA)189 190 % Hints: get(hObject,'String') returns contents of edit7 as text191 % str2double(get(hObject,'String')) returns contents of edit7 as a double192 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 MATLAB197 % handles structure with handles and user data (see GUIDATA)198 199 % Hints: get(hObject,'String') returns contents of edit8 as text200 % str2double(get(hObject,'String')) returns contents of edit8 as a double201 202 -
trunk/src/uvmat.m
r34 r36 4508 4508 path_to_uvmat=which ('uvmat');% check the path of uvmat 4509 4509 pathelp=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 4510 helpfile=fullfile(pathelp,'uvmat_doc','uvmat_doc.html'); 4511 if isempty(dir(helpfile)), msgbox_uvmat('ERROR','Please put the help file uvmat_doc.html in the sub-directory /uvmat_doc of the UVMAT package') 4512 else 4513 addpath (fullfile(pathelp,'uvmat_doc')) 4513 4514 web(helpfile); 4514 4515 end
Note: See TracChangeset
for help on using the changeset viewer.