Changeset 773 for trunk/src/uvmat.m
- Timestamp:
- May 10, 2014, 12:49:30 AM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/uvmat.m
r772 r773 649 649 [RootPath,SubDir,RootFile,i1_series,i2_series,j1_series,j2_series,tild,FileType,FileInfo,MovieObject]=find_file_series(fullfile(RootPath,SubDir),[RootFile FileIndices FileExt]); 650 650 % initiate the input file series and inputfilerefresh the current field view: 651 errormsg=update_rootinfo(handles,i1_series,i2_series,j1_series,j2_series,File Type,MovieObject,1);651 errormsg=update_rootinfo(handles,i1_series,i2_series,j1_series,j2_series,FileInfo,MovieObject,1); 652 652 % inputfilerefresh the second series if selected 653 653 if get(handles.SubField,'Value') … … 658 658 end 659 659 % detect the file type, get the movie object if relevant, and look for the corresponding file series: 660 [RootPath,SubDir,RootFile,i1_series,i2_series,j1_series,j2_series,tild,FileType, MovieObject]=find_file_series(fullfile(RootPath,SubDir),[RootFile FileIndices FileExt]);660 [RootPath,SubDir,RootFile,i1_series,i2_series,j1_series,j2_series,tild,FileType,FileInfo,MovieObject]=find_file_series(fullfile(RootPath,SubDir),[RootFile FileIndices FileExt]); 661 661 % initiate the input file series and inputfilerefresh the current field view: 662 errormsg=update_rootinfo(handles,i1_series,i2_series,j1_series,j2_series,File Type,MovieObject,2);662 errormsg=update_rootinfo(handles,i1_series,i2_series,j1_series,j2_series,FileInfo,MovieObject,2); 663 663 end 664 664 … … 830 830 831 831 % initiate input file series and inputfilerefresh the current field view: 832 update_rootinfo(handles,i1_series,i2_series,j1_series,j2_series,File Type,MovieObject,index);832 update_rootinfo(handles,i1_series,i2_series,j1_series,j2_series,FileInfo,MovieObject,index); 833 833 834 834 end … … 860 860 % --- Update information about a new field series (indices to scan, timing, 861 861 % calibration from an xml file, then inputfilerefresh current plots 862 function errormsg=update_rootinfo(handles,i1_series,i2_series,j1_series,j2_series,File Type,VideoObject,index)862 function errormsg=update_rootinfo(handles,i1_series,i2_series,j1_series,j2_series,FileInfo,VideoObject,index) 863 863 %------------------------------------------------------------------------ 864 864 errormsg=''; %default error msg … … 877 877 UvData.NewSeries=1; %flag for REFRESH: begin a new series 878 878 UvData.FileName_1='';% name of the current second field (used to detect a constant field during file scanning) 879 UvData.FileType{index}=FileType; 879 UvData.FileType{index}=FileInfo.FileType; 880 UvData.FileInfo{index}=FileInfo; 880 881 UvData.i1_series{index}=i1_series; 881 882 UvData.i2_series{index}=i2_series; … … 991 992 %% Define timing 992 993 % time not set by the input file: images or civ data: indicate that time is read from the xml file 994 FileType=FileInfo.FileType; 993 995 if isfield(XmlData,'Time')&& ~isempty(XmlData.Time) && ... 994 996 (strcmp(FileType,'image')|| strcmp(FileType,'multimage'))%||strcmp(FileType,'civdata')||strcmp(FileType,'civx')) … … 5508 5510 function MenuSeries_Callback(hObject, eventdata, handles) 5509 5511 %------------------------------------------------------------------------ 5510 Param=read_ param(handles);5512 Param=read_GUI(handles.uvmat); 5511 5513 Param.HiddenData=get(handles.uvmat,'UserData'); 5512 5514 series(Param); %run the series interface … … 5514 5516 % -------------------------------------------------------------------- 5515 5517 function MenuPIV_Callback(hObject, eventdata, handles) 5516 Param=read_param(handles);5518 Param=read_GUI(handles.uvmat); 5517 5519 Param.HiddenData=get(handles.uvmat,'UserData'); 5518 5520 hseries=series(Param); … … 5532 5534 civ(FileName);% interface de civ(not in the uvmat file) 5533 5535 5534 function Param=read_param(handles)5535 5536 [RootPath,SubDir,RootFile,FileIndex,FileExt]=read_file_boxes(handles);5537 Param.FileName=[fullfile(RootPath,SubDir,RootFile) FileIndex FileExt];%first input file name5538 if isequal(get(handles.SubField,'Value'),1)5539 [RootPath_1,SubDir_1,RootFile_1,FileIndex_1,FileExt_1]=read_file_boxes_1(handles);5540 FileName_1=[fullfile(RootPath_1,SubDir_1,RootFile_1) FileIndex_1 FileExt_1];5541 if ~isequal(FileName_1,Param.FileName)5542 Param.FileName_1=FileName_1;%second input file name if relevant5543 end5544 end5545 Param.NomType=get(handles.NomType,'String');5546 Param.NomType_1=get(handles.NomType_1,'String');5547 Param.CheckFixPair=get(handles.CheckFixPair,'Value');5548 UvData=get(handles.uvmat,'UserData');5549 if isfield(UvData,'XmlData')&& isfield(UvData.XmlData{1},'Time')5550 Param.Time=UvData.XmlData{1}.Time;5551 end5552 if isequal(get(handles.scan_i,'Value'),1)5553 Param.incr_i=str2num(get(handles.num_IndexIncrement,'String'));5554 elseif isequal(get(handles.scan_j,'Value'),1)5555 Param.incr_j=str2num(get(handles.num_IndexIncrement,'String'));5556 end5557 5558 % % transfer fields and coordinate names5559 Param.list_fields=get(handles.FieldName,'String');% list menu fields5560 FieldName=Param.list_fields{get(handles.FieldName,'Value')};5561 ind_image=find(strcmp('image',Param.list_fields));5562 if ~isempty(ind_image) && numel(Param.list_fields)>15563 Param.list_fields(ind_image)=[]; %suppress 'image' option5564 end5565 Param.index_fields=find(strcmp(FieldName,Param.list_fields));% selected string index5566 Param.list_fields_1=get(handles.FieldName_1,'String');% list menu fields5567 if ischar(Param.list_fields_1),Param.list_fields_1={Param.list_fields_1};end5568 FieldName_1=Param.list_fields_1{get(handles.FieldName_1,'Value')};5569 ind_image=find(strcmp('image',Param.list_fields_1));5570 if ~isempty(ind_image) && numel(Param.list_fields_1)>15571 Param.list_fields_1(ind_image)=[]; %suppress 'image' option5572 end5573 Param.index_fields_1=find(strcmp(FieldName_1,Param.list_fields_1));% selected string index5574 TransformList=get(handles.TransformName,'String');5575 Param.TransformName=TransformList{get(handles.TransformName,'Value')};5576 Param.Coord_x_str=get(handles.Coord_x,'String');5577 % Param.Coord_x_val=get(handles.Coord_x,'Value');5578 Param.Coord_y_str=get(handles.Coord_y,'String');5536 % function Param=read_param(handles) 5537 % 5538 % [RootPath,SubDir,RootFile,FileIndex,FileExt]=read_file_boxes(handles); 5539 % Param.FileName=[fullfile(RootPath,SubDir,RootFile) FileIndex FileExt];%first input file name 5540 % if isequal(get(handles.SubField,'Value'),1) 5541 % [RootPath_1,SubDir_1,RootFile_1,FileIndex_1,FileExt_1]=read_file_boxes_1(handles); 5542 % FileName_1=[fullfile(RootPath_1,SubDir_1,RootFile_1) FileIndex_1 FileExt_1]; 5543 % if ~isequal(FileName_1,Param.FileName) 5544 % Param.FileName_1=FileName_1;%second input file name if relevant 5545 % end 5546 % end 5547 % Param.NomType=get(handles.NomType,'String'); 5548 % Param.NomType_1=get(handles.NomType_1,'String'); 5549 % Param.CheckFixPair=get(handles.CheckFixPair,'Value'); 5550 % UvData=get(handles.uvmat,'UserData'); 5551 % if isfield(UvData,'XmlData')&& isfield(UvData.XmlData{1},'Time') 5552 % Param.Time=UvData.XmlData{1}.Time; 5553 % end 5554 % if isequal(get(handles.scan_i,'Value'),1) 5555 % Param.incr_i=str2num(get(handles.num_IndexIncrement,'String')); 5556 % elseif isequal(get(handles.scan_j,'Value'),1) 5557 % Param.incr_j=str2num(get(handles.num_IndexIncrement,'String')); 5558 % end 5559 % 5560 % %% transfer fields and coordinate names 5561 % Param.list_fields=get(handles.FieldName,'String');% list menu fields 5562 % FieldName=Param.list_fields{get(handles.FieldName,'Value')}; 5563 % ind_image=find(strcmp('image',Param.list_fields)); 5564 % if ~isempty(ind_image) && numel(Param.list_fields)>1 5565 % Param.list_fields(ind_image)=[]; %suppress 'image' option 5566 % end 5567 % Param.index_fields=find(strcmp(FieldName,Param.list_fields));% selected string index 5568 % Param.list_fields_1=get(handles.FieldName_1,'String');% list menu fields 5569 % if ischar(Param.list_fields_1),Param.list_fields_1={Param.list_fields_1};end 5570 % FieldName_1=Param.list_fields_1{get(handles.FieldName_1,'Value')}; 5571 % ind_image=find(strcmp('image',Param.list_fields_1)); 5572 % if ~isempty(ind_image) && numel(Param.list_fields_1)>1 5573 % Param.list_fields_1(ind_image)=[]; %suppress 'image' option 5574 % end 5575 % Param.index_fields_1=find(strcmp(FieldName_1,Param.list_fields_1));% selected string index 5576 % TransformList=get(handles.TransformName,'String'); 5577 % Param.TransformName=TransformList{get(handles.TransformName,'Value')}; 5578 % Param.Coord_x_str=get(handles.Coord_x,'String'); 5579 % %Param.Coord_x_val=get(handles.Coord_x,'Value'); 5580 % Param.Coord_y_str=get(handles.Coord_y,'String'); 5579 5581 5580 5582 % --------------------------------------------------------------------
Note: See TracChangeset
for help on using the changeset viewer.