Changeset 599 for trunk/src/series.m
- Timestamp:
- Apr 3, 2013, 10:21:53 AM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/series.m
r598 r599 282 282 oldfile=fullfile(RootPathCell{1},SubDirCell{1},RootFileCell{1}); 283 283 end 284 [FileName, PathName , filterindex] = uigetfile( ...284 [FileName, PathName] = uigetfile( ... 285 285 {'*.xml;*.xls;*.png;*.tif;*.avi;*.AVI;*.nc', ' (*.xml,*.xls, *.png,*.tif, *.avi,*.nc)'; 286 286 '*.xml', '.xml files '; ... … … 304 304 set_object(Param.ProjObject) 305 305 end 306 set(handles.REFRESH,'UserData', [1:size(Param.InputTable,1)])306 set(handles.REFRESH,'UserData',1:size(Param.InputTable,1)) 307 307 REFRESH_Callback([],[], handles) 308 308 return … … 456 456 RootPath=fileparts(RootPath); %will try the upped forldr 457 457 else 458 [RootPath,SubDir,RootFile,i1_series,i2_series,j1_series,j2_series,tild,FileType, MovieObject]=...458 [RootPath,SubDir,RootFile,i1_series,i2_series,j1_series,j2_series,tild,FileType,FileInfo,MovieObject]=... 459 459 find_file_series(fullfile(InputTable{iview,1},InputTable{iview,2}),[InputTable{iview,3} InputTable{iview,4} InputTable{iview,5}]); 460 460 end … … 475 475 display_file_name(handles,fileinput,iview) 476 476 else 477 update_rootinfo(handles,i1_series,i2_series,j1_series,j2_series,FileType, MovieObject,iview)477 update_rootinfo(handles,i1_series,i2_series,j1_series,j2_series,FileType,FileInfo,MovieObject,iview) 478 478 end 479 479 end … … 514 514 % detect the file type, get the movie object if relevant, and look for the corresponding file series: 515 515 % the root name and indices may be corrected by including the first index i1 if a corresponding xml file exists 516 [RootPath,SubDir,RootFile,i1_series,i2_series,j1_series,j2_series,NomType,FileType, MovieObject,i1,i2,j1,j2]=find_file_series(FilePath,[FileName FileExt]);516 [RootPath,SubDir,RootFile,i1_series,i2_series,j1_series,j2_series,NomType,FileType,FileInfo,MovieObject,i1,i2,j1,j2]=find_file_series(FilePath,[FileName FileExt]); 517 517 if isempty(RootFile)&&isempty(i1_series) 518 518 errormsg='no input file in the series'; … … 581 581 582 582 %% initiate input file series and refresh the current field view: 583 update_rootinfo(handles,i1_series,i2_series,j1_series,j2_series,FileType, MovieObject,iview);583 update_rootinfo(handles,i1_series,i2_series,j1_series,j2_series,FileType,FileInfo,MovieObject,iview); 584 584 585 585 %------------------------------------------------------------------------ 586 586 % --- Update information about a new field series (indices to scan, timing, 587 587 % calibration from an xml file 588 function update_rootinfo(handles,i1_series,i2_series,j1_series,j2_series,FileType, VideoObject,iview)588 function update_rootinfo(handles,i1_series,i2_series,j1_series,j2_series,FileType,FileInfo,VideoObject,iview) 589 589 %------------------------------------------------------------------------ 590 590 %% update the output dir … … 708 708 NbSlice_calib={}; 709 709 XmlFileName=find_imadoc(InputTable{iview,1},InputTable{iview,2},InputTable{iview,3},InputTable{iview,5}); 710 TimeUnit=''; 710 711 if ~isempty(XmlFileName) 711 712 [XmlData,warntext]=imadoc2struct(XmlFileName); … … 769 770 %% number of slices 770 771 NbSlice=1;%default 771 if isfield(XmlData,'GeometryCalib') && isfield(XmlData.GeometryCalib,'SliceCoord') 772 heck_calib=0; 773 if isfield(XmlData,'GeometryCalib') 774 check_calib=1; 775 if isfield(XmlData.GeometryCalib,'SliceCoord') 772 776 siz=size(XmlData.GeometryCalib.SliceCoord); 773 777 if siz(1)>1 774 778 NbSlice=siz(1); 779 end 775 780 end 776 781 end … … 793 798 SeriesData.j2_series{iview}=j2_series; 794 799 SeriesData.FileType{iview}=FileType; 800 SeriesData.FileInfo{iview}=FileInfo; 795 801 SeriesData.Time{iview}=time; 802 if ~isempty(TimeUnit) 803 SeriesData.TimeUnit=TimeUnit; 804 end 805 if check_calib 806 SeriesData.GeometryCalib{iview}=XmlData.GeometryCalib; 807 end 796 808 set(handles.series,'UserData',SeriesData) 797 809 … … 1313 1325 [Series,OutputDir,errormsg]=prepare_jobs(handles);% get parameters form the GUI series 1314 1326 if ~isempty(errormsg) 1327 if ~strcmp(errormsg,'Cancel') 1315 1328 msgbox_uvmat('ERROR',errormsg) 1329 end 1330 STOP_Callback([],[], handles) 1316 1331 return 1317 1332 end … … 1681 1696 while detect 1682 1697 answer=msgbox_uvmat('INPUT_Y-N',['use existing ouput directory: ' fullfile(Series.InputTable{1,1},SubDirOutNew) ', possibly delete previous data']); 1683 if isequal(answer,'Yes') 1698 if strcmp(answer,'Cancel') 1699 errormsg='Cancel'; 1700 return 1701 elseif strcmp(answer,'Yes') 1684 1702 detect=0; 1685 1703 check_create=0; … … 1849 1867 [Series,tild,errormsg]=prepare_jobs(handles);% read the parameters from the GUI series 1850 1868 if ~isempty(errormsg) 1869 if ~strcmp(errormsg,'Cancel') 1851 1870 msgbox_uvmat('ERROR',errormsg) 1871 end 1852 1872 return 1853 1873 end … … 2386 2406 Param=read_GUI(handles.series); 2387 2407 RootPath=Param.InputTable{1,1}; 2408 if ~isfield(Param,'OutputSubDir') 2409 msgbox_uvmat('ERROR','no directory defined for output files') 2410 return 2411 end 2388 2412 OutputSubDir=[Param.OutputSubDir Param.OutputDirExt];% subdirectory for output files 2389 2413 OutputDir=fullfile(RootPath,OutputSubDir);
Note: See TracChangeset
for help on using the changeset viewer.