- Timestamp:
- Dec 15, 2022, 6:21:53 PM (2 years ago)
- Location:
- trunk/src
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/find_file_series.m
r1107 r1120 49 49 50 50 %% get input root name and info on the input file 51 if isempty(regexp(FilePath,'^http://' ))51 if isempty(regexp(FilePath,'^http://','once')) 52 52 fullfileinput=fullfile(FilePath,fileinput);% input file name with path 53 53 else -
trunk/src/geometry_calib.m
r1115 r1120 190 190 end 191 191 192 %% read coordinates of the calibration poin nts: Coord(:,1-3) in phys, Coord(:,4-5) image192 %% read coordinates of the calibration points: Coord(:,1-3) in phys, Coord(:,4-5) image 193 193 Coord=get(handles.ListCoord,'Data'); 194 if isempty(Coord) 195 msgbox_uvmat('ERROR','introduce calibration points in the table Coord, or use the Tools Set scale') 196 return 197 end 194 198 195 199 -
trunk/src/get_file_info.m
r1107 r1120 62 62 FileInfo.FileName=fileinput; 63 63 FileInfo.FileType='txt'; %default 64 else65 return %input file does not exist.64 % else 65 % return %input file does not exist. 66 66 end 67 67 [tild,tild,FileExt]=fileparts(fileinput);%get the file extension FileExt … … 117 117 if ~isempty(FileExt) 118 118 if ~isempty(imformats(FileExt))%case of images 119 FileInfo.FileType='image'; 119 120 try 120 121 imainfo=imfinfo(fileinput); -
trunk/src/series.m
r1119 r1120 621 621 ActionInput_Callback([],[], handles) 622 622 623 623 %------------------------------------------------------------------------ 624 % --- check the input file series. 624 625 function check_input_file_series(handles) 626 %------------------------------------------------------------------------ 625 627 InputTable=get(handles.InputTable,'Data'); 626 628 set(handles.series,'Pointer','watch') % set the mouse pointer to 'watch' … … 629 631 empty_line=false(size(InputTable,1),1); 630 632 for iline=1:size(InputTable,1) 631 empty_line(iline)= isempty(cell2mat(InputTable(iline,1:3))); 633 empty_line(iline)= isempty(cell2mat(InputTable(iline,1:3)));%check the empty lines in the input table 632 634 end 633 635 if ~isempty(find(empty_line,1)) … … 649 651 RootFile=''; 650 652 else %scan the input folder 651 InputTable{iview,3}=regexprep(InputTable{iview,3},'^/',''); 653 InputTable{iview,3}=regexprep(InputTable{iview,3},'^/','');%suppress '/' at the beginning of the input name 654 i1=str2num(get(handles.num_first_i,'String')); 655 j1=str2num(get(handles.num_first_j,'String')); 656 InputFile=fullfile_uvmat('','',InputTable{iview,3},InputTable{iview,5},InputTable{iview,4},i1,[],j1,[]) 652 657 [RootPath,~,RootFile,i1_series,i2_series,j1_series,j2_series,tild,FileInfo,MovieObject]=... 653 find_file_series(fullfile(InputTable{iview,1},InputTable{iview,2}), [InputTable{iview,3} InputTable{iview,4} InputTable{iview,5}]);658 find_file_series(fullfile(InputTable{iview,1},InputTable{iview,2}),InputFile); 654 659 end 655 660 % if no file is found, open a browser -
trunk/src/series/stereo_civ.m
r1118 r1120 1 %' civ_series': PIV function activated by the general GUI series1 %'stereo_series': PIV function activated by the general GUI series 2 2 % --- call the sub-functions: 3 3 % civ: PIV function itself … … 41 41 Data=[]; 42 42 errormsg=''; 43 43 44 %% set the input elements needed on the GUI series when the action is selected in the menu ActionName or InputTable refreshed 44 45 if isstruct(Param) && isequal(Param.Action.RUN,0)% function activated from the GUI series but not RUN … … 49 50 path_series=fileparts(which('series')); 50 51 addpath(fullfile(path_series,'series')) 51 Data=stereo_input(Param);% introduce the civ parameters using the GUI civ_input52 Data=stereo_input(Param);% introduce the civ parameters using the GUI stereo_input 52 53 if isempty(Data) 53 54 Data=Param;% if civ_input has been cancelled, keep previous parameters … … 1309 1310 mtz=(XmlData{1}.GeometryCalib.Tx_Ty_Tz(1,3)+XmlData{2}.GeometryCalib.Tx_Ty_Tz(1,3))/2; 1310 1311 1311 Error=(sqrt(mfx^2+mfy^2)/(2*sqrt(2)*mtz)).*(((Dyb-Dya).*(-u)-(Dxb-Dxa).*(-v))./Den);1312 1312 %Error=(sqrt(mfx^2+mfy^2)/(2*sqrt(2)*mtz)).*(((Dyb-Dya).*(-u)-(Dxb-Dxa).*(-v))./sqrt(Den)); 1313 Error=(((Dyb-Dya).*(-u)-(Dxb-Dxa).*(-v))./sqrt(Den)); 1313 1314 z=((Dxb-Dxa).*(-u)+(Dyb-Dya).*(-v))./Den; 1314 1315 -
trunk/src/uvmat.m
r1118 r1120 1209 1209 UvData=get(handles.uvmat,'UserData');%read UvData properties stored on the uvmat interface 1210 1210 Slice=[]; 1211 Check_slice=0; 1211 1212 if isfield(UvData,'XmlData') 1213 if isfield(UvData.XmlData{1},'GeometryCalib') && strcmp(UvData.XmlData{1}.GeometryCalib.CalibrationType(1:3),'3D_') 1214 Check_slice=1; 1215 end 1212 1216 if isfield(UvData.XmlData{1},'GeometryCalib')&& isfield(UvData.XmlData{1}.GeometryCalib,'SliceCoord') 1213 1217 Slice=UvData.XmlData{1}.GeometryCalib;%old convention < 2022 … … 1215 1219 Slice=UvData.XmlData{1}.Slice;% new convention ( 2022) 1216 1220 end 1221 end 1222 if ~Check_slice 1223 msgbox_uvmat('ERROR','3D calibration not available, use Tools/geometric calibration with 3D option'); 1224 return 1217 1225 end 1218 1226 % default input … … 1295 1303 1296 1304 uicontrol('Style','edit','Units','normalized', 'Position', [3*ii+ww 0.95-5*ii-4.2*hh ww hh],'tag','num_SliceCoord_1','BackgroundColor',[1 1 1],... 1297 'String',num2str(Slice.SliceCoord(1 )),'FontUnits','points','FontSize',12,'FontWeight','bold','TooltipString','''num_SliceCoord_1'':x position of the tild origin');%edit box1305 'String',num2str(Slice.SliceCoord(1,1)),'FontUnits','points','FontSize',12,'FontWeight','bold','TooltipString','''num_SliceCoord_1'':x position of the tild origin');%edit box 1298 1306 uicontrol('Style','edit','Units','normalized', 'Position', [3*ii+ww 0.95-6*ii-5.2*hh ww hh],'tag','num_SliceCoord_2','BackgroundColor',[1 1 1],... 1299 'String',num2str(Slice.SliceCoord( 2)),'FontUnits','points','FontSize',12,'FontWeight','bold','TooltipString','''num_SliceCoord_2'':y position of the tild origin');%edit box1307 'String',num2str(Slice.SliceCoord(1,2)),'FontUnits','points','FontSize',12,'FontWeight','bold','TooltipString','''num_SliceCoord_2'':y position of the tild origin');%edit box 1300 1308 1301 1309 uicontrol('Style','text','Units','normalized', 'Position', [ii 0.95-5*ii-4*hh 1.3*ww hh/2],'BackgroundColor',BackgroundColor,'Tag','Angle_title_1',... … … 1353 1361 [RootPath,SubDir,RootFile,tild,tild,tild,tild,FileExt]=fileparts_uvmat(FileName); 1354 1362 XmlFile=find_imadoc(RootPath,SubDir,RootFile,FileExt);%find name of the relevant xml file 1355 % [s,errormsg]=imadoc2struct(XmlFile,'Slice');%read the xml file 1356 % if~isempty(errormsg) 1357 % msgbox_uvmat('ERROR',errormsg) 1358 % return 1359 % end 1360 % Slice=s.Slice;% get thegeometric calibration data 1363 if isempty(XmlFile) 1364 msgbox_uvmat('ERROR','an xml file with calibration parameters must be first created, use Tools/geometric calibration'); 1365 return 1366 end 1367 [s,RootTag,errormsg]=xml2struct(XmlFile); 1361 1368 1362 1369 %% read the content of the GUI set_slice … … 1370 1377 Z_plane=linspace(SliceData.Z(1),SliceData.Z(2),SliceData.NbSlice); 1371 1378 else 1372 set(hZ,'String',num2str(Z_plane))% restitute the display qfter reqding by read_GUI1379 set(hZ,'String',num2str(Z_plane))% restitute the display after reading by read_GUI 1373 1380 end 1374 1381 Slice.SliceCoord=Z_plane'*[0 0 1]; … … 3315 3322 elseif ref_i_1+1>size(UvData.i1_series{2},3)&&~isempty(InputFile.NomType_1) 3316 3323 errormsg='maximum i index reached for the second series (reload the input file to update the index bound)'; 3317 elseif ref_j_1+1>size(UvData.i1_series{2},2)&&~isempty(InputFile.NomType_1)3318 errormsg='maximum j index reached for the second series(reload the input file to update the index bound)';3324 %elseif ref_j_1+1>size(UvData.i1_series{2},2)&&~isempty(InputFile.NomType_1) 3325 % errormsg='maximum j index reached for the second series(reload the input file to update the index bound)'; 3319 3326 end 3320 3327 if ~isempty(errormsg),return,end
Note: See TracChangeset
for help on using the changeset viewer.