Changeset 72 for trunk/src/uvmat.m


Ignore:
Timestamp:
Mar 30, 2010, 11:03:42 AM (11 years ago)
Author:
sommeria
Message:

ima2vol: write image volumes in 16 bits (test for civ_3D)
plot-text removed: put as a sub-function of plot_field
uvmat: movie stops in case of error in reding files
bug fixes for reading 3D vel fields

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/uvmat.m

    r71 r72  
    16031603
    16041604while get(handles.speed,'Value')~=0 & isequal(get(handles.RunMovie,'BusyAction'),'queue') % enable STOP command
    1605         runpm(hObject,eventdata,handles,increment)
     1605        errormsg=runpm(hObject,eventdata,handles,increment);
     1606        if ~isempty(errormsg)
     1607            return
     1608        end
    16061609        pause(1.02-get(handles.speed,'Value'))% wait for next image
    16071610end
     
    16221625
    16231626%------------------------------------------------------------------
    1624 function runpm(hObject,eventdata,handles,increment)
     1627function errormsg=runpm(hObject,eventdata,handles,increment)
    16251628%------------------------------------------------------------------
    16261629%check for mùovie pair status
     
    24112414        %Zvar=DimVarIndex(DimIndex(1));
    24122415         %Zvar=DimVarIndex(1);
    2413          Zvar=VarType{imax}.coord_3;
    2414         if Zvar~=0 % z is a dimension variable
    2415             ZName=UvData.Field.ListVarName{Zvar};
     2416%          Zvar=VarType{imax}.coord_3;
     2417        if isfield(VarType{imax},'coord_3')&& ~isequal(VarType{imax}.coord_3,0) % z is a dimension variable
     2418            ZName=UvData.Field.ListVarName{VarType{imax}.coord_3}
    24162419            eval(['UvData.ZMax=max(UvData.Field.' ZName ');'])
    24172420            eval(['UvData.ZMin=min(UvData.Field.' ZName ');'])
     
    24862489    ZBounds(1)=UvData.ZMin; %minimum for the Z slider
    24872490    ZBounds(2)=UvData.ZMax;%maximum for the Z slider
     2491    UvData.Object{1}.Name='1-PLANE';
     2492    UvData.Object{1}.enable_plot=1;
    24882493    set_object(UvData.Object{1},PlotHandles,ZBounds);
    24892494    set(handles.list_object_1,'Value',1);
     
    47594764UvData.MouseAction='create_object';
    47604765set(handles.uvmat,'UserData',UvData)
     4766set(handles.delete_object,'Visible','on')
     4767set(handles.uvmat_title,'Visible','on')
     4768set(handles.viw_field_title,'Visible','on')
    47614769
    47624770%------------------------------------------------------------------------
     
    48034811[hset_object,UvData.sethandles]=set_object(data,PlotHandles);% call the set_object interface
    48044812
    4805 pos_uvmat=get(handles.uvmat,'Position');
    4806 %position the set_object GUI with respect to uvmat
    4807 if isfield(UvData,'SetObjectOrigin')
    4808     pos_set_object(1:2)=UvData.SetObjectOrigin + pos_uvmat(1:2);
    4809     pos_set_object(3:4)=UvData.SetObjectSize .* pos_uvmat(3:4);
    4810     set(hset_object,'Position',pos_set_object)
    4811 end
     4813% pos_uvmat=get(handles.uvmat,'Position');
     4814% %position the set_object GUI with respect to uvmat
     4815% if isfield(UvData,'SetObjectOrigin')
     4816%     pos_set_object(1:2)=UvData.SetObjectOrigin + pos_uvmat(1:2);
     4817%     pos_set_object(3:4)=UvData.SetObjectSize .* pos_uvmat(3:4);
     4818%     set(hset_object,'Position',pos_set_object)
     4819% end
    48124820
    48134821UvData.MouseAction='create_object';
     
    48154823set(handles.zoom,'Value',0)
    48164824zoom_Callback(handles.uvmat, [], handles)
     4825set(handles.delete_object,'Visible','on')
     4826set(handles.uvmat_title,'Visible','on')
     4827set(handles.viw_field_title,'Visible','on')
    48174828
    48184829%------------------------------------------------------------------------
Note: See TracChangeset for help on using the changeset viewer.