Changeset 236 for trunk/src/civ.m


Ignore:
Timestamp:
Apr 12, 2011, 12:12:19 AM (13 years ago)
Author:
sommeria
Message:

correct Matlab PIV, remove call to image tool box. Improve menu of uvmat VelType? (replacement of buttons)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/civ.m

    r233 r236  
    819819else
    820820    mode_list=get(handles.mode,'String');
     821    if ischar(mode_list)
     822        mode_list={mode_list};
     823    end
    821824    mode_value=get(handles.mode,'Value');
    822825    mode=mode_list{mode_value};
     
    14261429    display(errormsg)
    14271430    msgbox_uvmat('ERROR',errormsg)
    1428 elseif  isfield(handles,'status') && ~isequal(get(handles.CivAll,'Value'),3)
     1431elseif  isfield(handles,'status') %&& ~isequal(get(handles.CivAll,'Value'),3)
    14291432    set(handles.status,'Value',1);%suppress status display
    14301433    status_Callback(hObject, eventdata, handles)
     
    43194322PointCoord(:,1)=reshape(GridX,[],1);
    43204323PointCoord(:,2)=reshape(GridY,[],1);
    4321 
    43224324% caluclate velocity data (y and v in indices, reverse to y component)
    4323 [xtable ytable utable vtable ctable typevector] = pivlab (image1,image2,ibx2,iby2,isx2,isy2,shiftx,shifty,PointCoord, 1, []);
    4324 Data.ListGlobalAttribute={'title','Time','Dt'};
    4325 Data.title='PIVlab';
     4325[xtable ytable utable vtable ctable F] = pivlab (image1,image2,ibx2,iby2,isx2,isy2,shiftx,shifty,PointCoord, 1, []);
     4326Data.ListGlobalAttribute=[{'Conventions','Program','CivStage'} {'Time','Dt'}];
     4327Data.Conventions='uvmat/civdata';
     4328Data.Program='civ_uvmat';
     4329Data.CivStage=1;
     4330% list_param=fieldnames(Param.Civ1);
     4331% for ilist=1:length(list_param)
     4332%     eval(['Data.Civ1_' list_param{ilist} '=Param.Civ1.' list_param{ilist} ';'])
     4333% end
    43264334Data.Time=str2double(par_civ1.T0);
    43274335Data.Dt=str2double(par_civ1.Dt);
    4328 Data.ListVarName={'X','Y','U','V','C','FF'};%  cell array containing the names of the fields to record
     4336Data.ListVarName={'Civ1_X','Civ1_Y','Civ1_U','Civ1_V','Civ1_C','Civ1_F'};%  cell array containing the names of the fields to record
    43294337Data.VarDimName={'nbvec','nbvec','nbvec','nbvec','nbvec','nbvec'};
    43304338Data.VarAttribute{1}.Role='coord_x';
     
    43324340Data.VarAttribute{3}.Role='vector_x';
    43334341Data.VarAttribute{4}.Role='vector_y';
    4334 Data.VarAttribute{5}.Role='errorflag';
    4335 Data.X=reshape(xtable,[],1);
    4336 Data.Y=reshape(size(image1,1)-ytable+1,[],1);
    4337 Data.U=reshape(utable,[],1);
    4338 Data.V=reshape(-vtable,[],1);
    4339 Data.C=reshape(ctable,[],1);
    4340 Data.FF=reshape(~typevector,[],1);
     4342Data.VarAttribute{5}.Role='warnflag';
     4343Data.Civ1_X=reshape(xtable,[],1);
     4344Data.Civ1_Y=reshape(size(image1,1)-ytable+1,[],1);
     4345Data.Civ1_U=reshape(utable,[],1);
     4346Data.Civ1_V=reshape(-vtable,[],1);
     4347Data.Civ1_C=reshape(ctable,[],1);
     4348Data.Civ1_F=reshape(F,[],1);
    43414349
    43424350%------------------------------------------------------------------------
     
    47254733    ViewData.CivHandle=handles.civ;% indicate the handle of the civ GUI in view_field
    47264734    ViewData.axes3.B=imread(filecell.ima2.civ1{1});%store the second image in the UserData of the GUI view_field
    4727     ViewData.axes3.X=Data.X; %keep the set of points in memeory
    4728     ViewData.axes3.Y=Data.Y;
     4735    ViewData.axes3.X=Data.Civ1_X; %keep the set of points in memeory
     4736    ViewData.axes3.Y=Data.Civ1_Y;
    47294737    set(hview_field,'UserData',ViewData)
    47304738    corrfig=findobj(allchild(0),'tag','corrfig');% look for a current figure for image correlation display
Note: See TracChangeset for help on using the changeset viewer.