Changeset 150 for trunk/src/civ.m


Ignore:
Timestamp:
Dec 3, 2010, 12:16:51 PM (14 years ago)
Author:
sommeria
Message:

various corrections for plotting and using view_field and get_field. The current field of uvmat or view_field is now stored in the structure userdata.axes3. Introduction of live correlation to test PIV (civ1)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/civ.m

    r147 r150  
    2222function varargout = civ(varargin)
    2323
    24 % Last Modified by GUIDE v2.5 27-Mar-2010 13:41:11
     24% Last Modified by GUIDE v2.5 01-Dec-2010 23:19:15
    2525% Begin initialization code - DO NOT EDIT
    2626gui_Singleton = 1;
     
    225225end
    226226
    227 set(handles.waitbar_1,'Position',[0.946 0.877 0.03 0.001])
    228 set(handles.waitbar_patch1,'Position',[0.946 0.626 0.03 0.001])
    229 set(handles.waitbar_civ2,'Position',[0.946 0.406 0.03 0.001])
    230 set(handles.waitbar_patch2,'Position',[0.946 0.187 0.03 0.001])
     227% set(handles.waitbar_1,'Position',[0.946 0.877 0.03 0.001])
     228% set(handles.waitbar_patch1,'Position',[0.946 0.626 0.03 0.001])
     229% set(handles.waitbar_civ2,'Position',[0.946 0.406 0.03 0.001])
     230% set(handles.waitbar_patch2,'Position',[0.946 0.187 0.03 0.001])
    231231
    232232%------------------------------------------------------------------------
     
    772772
    773773%%%%%% initialize waitbars and RUN button
    774 set(handles.waitbar_1,'Position',[0.946 0.876 0.03 0.001])
    775 set(handles.waitbar_patch1,'Position',[0.946 0.439 0.03 0.001])
    776 set(handles.waitbar_civ2,'Position',[0.946 0.219 0.03 0.001])
    777 set(handles.waitbar_patch2,'Position',[0.946 0.0 0.03 0.001])
     774% set(handles.waitbar_1,'Position',[0.946 0.876 0.03 0.001])
     775% set(handles.waitbar_patch1,'Position',[0.946 0.439 0.03 0.001])
     776% set(handles.waitbar_civ2,'Position',[0.946 0.219 0.03 0.001])
     777% set(handles.waitbar_patch2,'Position',[0.946 0.0 0.03 0.001])
    778778set(handles.RUN, 'Enable','On')
    779779set(handles.RUN,'BackgroundColor',[1 0 0])
     
    16231623
    16241624%% initialize the waitbars: TO suppress, waitbar not used
    1625 set(handles.waitbar_1,'Position',[0.946 0.876 0.03 0.001])
    1626 set(handles.waitbar_patch1,'Position',[0.946 0.439 0.03 0.001])
    1627 set(handles.waitbar_civ2,'Position',[0.946 0.219 0.03 0.001])
    1628 set(handles.waitbar_patch2,'Position',[0.946 0.0 0.03 0.001])
    1629 drawnow
     1625% set(handles.waitbar_1,'Position',[0.946 0.876 0.03 0.001])
     1626% set(handles.waitbar_patch1,'Position',[0.946 0.439 0.03 0.001])
     1627% set(handles.waitbar_civ2,'Position',[0.946 0.219 0.03 0.001])
     1628% set(handles.waitbar_patch2,'Position',[0.946 0.0 0.03 0.001])
     1629% drawnow
    16301630
    16311631%% set the list of files and check them
    16321632display('checking the files...')
    1633 compare=get(handles.compare,'Value');%test for usual PIV (compare=1) or displacement (=2) or stereo PIV (=3)
     1633%compare=get(handles.compare,'Value');%test for usual PIV (compare=1) or displacement (=2) or stereo PIV (=3)
    16341634[filecell,num1_civ1,num2_civ1,num_a_civ1,num_b_civ1,num1_civ2,num2_civ2,num_a_civ2,num_b_civ2,nom_type_nc]=...
    1635     set_civ_filenames(handles,compare,box_test);
     1635    set_civ_filenames(handles,box_test);
    16361636if isempty(filecell)% (error message displayed in fct set_civ_filenames)
    16371637    return
     
    22762276
    22772277function [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]=...
    2278     set_civ_filenames(handles,compare,box_test)
     2278    set_civ_filenames(handles,box_test)
    22792279%------------------------------------------------------------------------
    22802280filecell=[];%default
     
    39563956par.pxcmx='1'; %velocities are expressed in pixel dispalcement
    39573957par.pxcmy='1';
    3958 %      end
     3958if exist('file_ima','var')
    39593959A=imread(file_ima);%read the first image to get the size
    39603960sizim=size(A);
    39613961par.npx=num2str(sizim(2));
    39623962par.npy=num2str(sizim(1));
     3963end
    39633964%time=get(handles.RootName,'UserData'); %get the set of times
    39643965par.gridname=get(handles.grid_civ1,'String');
     
    45954596
    45964597
    4597 
    4598 
     4598% --- Executes on button press in TestCiv1.
     4599function TestCiv1_Callback(hObject, eventdata, handles)
     4600test_civ1=get(handles.TestCiv1,'Value');
     4601if test_civ1
     4602[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]=...
     4603    set_civ_filenames(handles,[1 0 0 0 0 0]);
     4604Data.ListVarName={'ny','nx','A'};
     4605Data.VarDimName={'ny','nx',{'ny','nx'}};
     4606Data.A=imread(filecell.ima1.civ1{1});
     4607Data.ny=[size(Data.A,1) 1];
     4608Data.nx=[1 size(Data.A,2)];
     4609hh=view_field(Data);
     4610ViewData=get(hh,'UserData');
     4611ViewData.axes3.B=imread(filecell.ima2.civ1{1});
     4612set(hh,'UserData',ViewData)
     4613end
     4614
     4615
     4616
     4617
     4618
     4619
Note: See TracChangeset for help on using the changeset viewer.