Changeset 406 for trunk/src/uvmat.m


Ignore:
Timestamp:
May 3, 2012, 7:30:05 PM (9 years ago)
Author:
sommeria
Message:

bugs corrected in civ_matlab and object projection

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/uvmat.m

    r405 r406  
    7979% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%   DATA FLOW  (for run0_Callback) %%%%%%%%%%%%%%%%%%%%:
    8080%
    81 % fields are opened and visualised by the sub-function refresh_field.m
    82 % (called by uvmat_opening, RUN0, runp and runm)
     81%
     82% 1) Input filenames are determined by MenuBrowse (first field), MenuBrowse_1
     83% (second field), or by the stored file names under  Browse, or as an input of uvmat.
     84% 2) These functions call 'display_file_name.m' which detects the file series, and fills the file index boxes
     85% 3) Then 'update_rootinfo.m' Updates information about a new field series (indices to scan, timing, calibration from an xml file)
     86% 4) Then fields are opened and visualised by the main sub-function 'refresh_field.m'
    8387% The function first reads the name of the input file from the edit boxes  of the GUI
    84 % A second input file can be introduced for filed comparison
     88% A second input file can be introduced for file comparison
    8589% It then reads the input file(s) with the appropriate function, read for
    8690% images, read_civxdata.m for CIVx PIV data, nc2struct for other netcdf
     
    168172%------------------------------------------------------------------------
    169173%------------------------------------------------------------------------
    170 %  I - MAIN FUNCTION UVMAT
     174%  I - MAIN FUNCTION uvmat
    171175%------------------------------------------------------------------------
    172176%------------------------------------------------------------------------
     
    343347if ~isempty(inputfile)
    344348    %%%%% display the input field %%%%%%%
    345     display_file_name(hObject, eventdata, handles,inputfile)
     349    display_file_name(handles,inputfile)
    346350    %%%%%%%
    347351    testinputfield=1;
     
    442446
    443447% display the selected field and related information
    444 display_file_name(hObject, eventdata, handles,fileinput)
     448display_file_name( handles,fileinput)
    445449
    446450% -----------------------------------------------------------------------
     
    449453%------------------------------------------------------------------------
    450454fileinput=get(handles.MenuFile_1,'Label');
    451 display_file_name(hObject, eventdata, handles,fileinput)
     455display_file_name( handles,fileinput)
    452456
    453457% -----------------------------------------------------------------------
     
    456460%------------------------------------------------------------------------
    457461fileinput=get(handles.MenuFile_2,'Label');
    458 display_file_name(hObject, eventdata, handles,fileinput)
     462display_file_name(handles,fileinput)
    459463
    460464% -----------------------------------------------------------------------
     
    463467%------------------------------------------------------------------------
    464468fileinput=get(handles.MenuFile_3,'Label');
    465 display_file_name(hObject, eventdata, handles,fileinput)
     469display_file_name(handles,fileinput)
    466470
    467471% -----------------------------------------------------------------------
     
    470474%------------------------------------------------------------------------
    471475fileinput=get(handles.MenuFile_4,'Label');
    472 display_file_name(hObject, eventdata, handles,fileinput)
     476display_file_name(handles,fileinput)
    473477
    474478% -----------------------------------------------------------------------
     
    477481%------------------------------------------------------------------------
    478482fileinput=get(handles.MenuFile_5,'Label');
    479 display_file_name(hObject, eventdata, handles,fileinput)
     483display_file_name(handles,fileinput)
    480484
    481485%------------------------------------------------------------------------
     
    511515% refresh the current displayed field
    512516set(handles.SubField,'Value',1)
    513 display_file_name(hObject,eventdata,handles,fileinput_1,2)
     517display_file_name(handles,fileinput_1,2)
    514518
    515519%update list of recent files in the menubar
     
    550554fileinput_1=get(handles.MenuFile_1_1,'Label');
    551555set(handles.SubField,'Value',1)
    552 display_file_name(hObject,eventdata,handles,fileinput_1,2)
     556display_file_name(handles,fileinput_1,2)
    553557
    554558% -----------------------------------------------------------------------
     
    558562fileinput_1=get(handles.MenuFile_2_1,'Label');
    559563set(handles.SubField,'Value',1)
    560 display_file_name(hObject,eventdata,handles,fileinput_1,2)
     564display_file_name(handles,fileinput_1,2)
    561565
    562566% -----------------------------------------------------------------------
     
    566570fileinput_1=get(handles.MenuFile_3_1,'Label');
    567571set(handles.SubField,'Value',1)
    568 display_file_name(hObject,eventdata,handles,fileinput_1,2)
     572display_file_name(handles,fileinput_1,2)
    569573
    570574% -----------------------------------------------------------------------
     
    574578fileinput_1=get(handles.MenuFile_4_1,'Label');
    575579set(handles.SubField,'Value',1)
    576 display_file_name(hObject,eventdata,handles,fileinput_1,2)
     580display_file_name(handles,fileinput_1,2)
    577581
    578582% -----------------------------------------------------------------------
     
    582586fileinput_1=get(handles.MenuFile_5_1,'Label');
    583587set(handles.SubField,'Value',1)
    584 display_file_name(hObject,eventdata,handles,fileinput_1,2)
     588display_file_name(handles,fileinput_1,2)
    585589
    586590%------------------------------------------------------------------------
     
    593597[RootPath,SubDir,RootFile,i1_series,i2_series,j1_series,j2_series,tild,FileType,MovieObject]=find_file_series(fullfile(RootPath,SubDir),[RootFile FileIndices FileExt]);
    594598% initiate the input file series and refresh the current field view:
    595 update_rootinfo(handles,i1_series,i2_series,j1_series,j2_series,FileType,MovieObject);
     599update_rootinfo(handles,i1_series,i2_series,j1_series,j2_series,FileType,MovieObject,1);
    596600
    597601%-----------------------------------------------------------------------
     
    674678%------------------------------------------------------------------------
    675679% --- Fills the edit boxes RootPath, RootFile,NomType...from an input file name 'fileinput'
    676 function display_file_name(hObject, eventdata, handles,fileinput,index)
     680function display_file_name(handles,fileinput,index)
    677681%------------------------------------------------------------------------
    678682%% look for the input file existence
     
    687691drawnow
    688692
    689 %% define the relevant handles for the first fiel series (index=1) or the second file series (index=2)
     693%% define the relevant handles for the first field series (index=1) or the second file series (index=2)
    690694if ~exist('index','var')
    691695    index=1;
     
    698702    handles_NomType=handles.NomType;
    699703    handles_FileExt=handles.FileExt;
    700 %     handles_Fields=handles.Fields;
    701704elseif index==2
    702705    handles_RootPath=handles.RootPath_1;
     
    706709    handles_NomType=handles.NomType_1;
    707710    handles_FileExt=handles.FileExt_1;
    708 %     handles_Fields=handles.Fields_1;
    709711    set(handles.RootPath_1,'Visible','on')
    710712    set(handles.RootFile_1,'Visible','on')
     
    782784            else
    783785                set(handles.SubField,'Value',0)
    784                 SubField_Callback(hObject, eventdata, handles)
     786                SubField_Callback([], [], handles)
    785787            end
    786788        end
     
    11321134end
    11331135
    1134 %% update list of recent files in the menubar
     1136%% update list of recent files in the menubar and save it for future opening
    11351137MenuFile=[{get(handles.MenuFile_1,'Label')};{get(handles.MenuFile_2,'Label')};...
    11361138    {get(handles.MenuFile_3,'Label')};{get(handles.MenuFile_4,'Label')};{get(handles.MenuFile_5,'Label')}];
     
    29612963    end
    29622964     % display the selected field and related information
    2963     display_file_name(hObject, eventdata, handles,imagename)%display the image
     2965    display_file_name(handles,imagename)%display the image
    29642966    return
    29652967else
     
    29732975        filename=[PathName FileName];
    29742976        % display the selected field and related information
    2975         display_file_name(hObject, eventdata, handles,filename)
     2977        display_file_name( handles,filename)
    29762978        return
    29772979    end
     
    30683070            set(handles.num_Npx,'Visible','on')
    30693071            set(handles.num_Npy,'Visible','on')
    3070             display_file_name(hObject, eventdata, handles,imagename,2)%display the imag
     3072            display_file_name(handles,imagename,2)%display the imag
    30713073        end
    30723074    otherwise
     
    43324334    if isfield(UvData.Field,'Mesh')&&~isempty(UvData.Field.Mesh)
    43334335        data.RangeX=[UvData.Field.XMin UvData.Field.XMax];
    4334         data.RangeY=[UvData.Field.YMin UvData.Field.YMax];
     4336        if strcmp(data.Type,'line')||rcmp(data.Type,'polyline')
     4337            data.RangeY=UvData.Field.Mesh;
     4338        else
     4339            data.RangeY=[UvData.Field.YMin UvData.Field.YMax];
     4340        end
    43354341        data.DX=UvData.Field.Mesh;
    43364342        data.DY=UvData.Field.Mesh;
     4343       
    43374344%     elseif isfield(Field,'AX')&& isfield(Field,'AY')&& isfield(Field,'A')%only image
    43384345%         np=size(Field.A);
Note: See TracChangeset for help on using the changeset viewer.