Changeset 61 for trunk/src/uvmat.m


Ignore:
Timestamp:
Mar 24, 2010, 12:51:51 AM (14 years ago)
Author:
sommeria
Message:

gestion of projection objects improved. Implementation of view_field.fig
introduction of a circle to mark vectors with the mouse
various cleaning and debugging

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/uvmat.m

    r60 r61  
    246246if ~isfield(UvData.Object{1},'plotaxes')
    247247    UvData.Object{1}.plotaxes=handles.axes3;%default plotting axis
    248     set(handles.list_object,'String',{'1-PLANE'});
    249     set(handles.list_object,'Value',1);
     248    set(handles.list_object_1,'String',{'1-PLANE'});
     249    set(handles.list_object_1,'Value',1);
    250250end
    251251
     
    379379        set(handles.OBJECT_txt,'Visible','on')
    380380        set(handles.edit,'Visible','on')
    381         set(handles.list_object,'Visible','on')
     381        set(handles.list_object_1,'Visible','on')
    382382        set(handles.frame_object,'Visible','on')
    383383    else
     
    598598        set(handles.OBJECT_txt,'Visible','on')
    599599        set(handles.edit,'Visible','on')
    600         set(handles.list_object,'Visible','on')
     600        set(handles.list_object_1,'Visible','on')
    601601        set(handles.frame_object,'Visible','on')
    602602         % initiate input file:
     
    647647drawnow
    648648set(handles.Fields,'UserData',[])% reinialize data from uvmat opening
    649 %huvmat=get(handles.RootPath,'parent');
    650649UvData=get(handles.uvmat,'UserData');%huvmat=handles of the uvmat interface
    651650UvData.NewSeries=1; %flag for run0: begin a new series
     
    920919function MenuBrowse_1_Callback(hObject, eventdata, handles)
    921920%-------------------------------------------------------------------
    922 huvmat=get(handles.run0,'parent');
    923 UvData=get(huvmat,'UserData');
     921% huvmat=get(handles.run0,'parent');
     922UvData=get(handles.uvmat,'UserData');
    924923
    925924RootPath=get(handles.RootPath,'String');
     
    11421141set(handles.RootPath_1,'BackgroundColor',[1 1 0])% indicate active program by yellow color
    11431142drawnow
    1144 huvmat=get(handles.RootPath,'parent');
    1145 UvData=get(huvmat,'UserData');%huvmat=handles of the uvmat interface
     1143%huvmat=get(handles.RootPath,'parent');
     1144UvData=get(handles.uvmat,'UserData');%huvmat=handles of the uvmat interface
    11461145UvData.NewSeries=1; %flag for run0: begin a new series
    11471146
     
    12791278end
    12801279UvData.XmlData_1=XmlData;
    1281 set(huvmat,'UserData',UvData)%update the data attached to the uvmat interface
     1280set(handles.uvmat,'UserData',UvData)%update the data attached to the uvmat interface
    12821281
    12831282if ~isequal(warntext,'')
     
    14761475    end
    14771476    set(handles.mask_test,'UserData',[])   
    1478     huvmat=get(handles.mask_test,'parent');
    1479     UvData=get(huvmat,'UserData');
     1477    %huvmat=get(handles.mask_test,'parent');
     1478    UvData=get(handles.uvmat,'UserData');
    14801479    if isfield(UvData,'MaskName')
    14811480        UvData=rmfield(UvData,'MaskName');
    1482         set(huvmat,'UserData',UvData)
     1481        set(handles.uvmat,'UserData',UvData)
    14831482    end
    14841483    set(handles.mask_test,'BackgroundColor',[0.7 0.7 0.7])
     
    24552454if ~isfield(UvData.Object{1},'plotaxes')
    24562455    UvData.Object{1}.plotaxes=handles.axes3;%default plotting axis
    2457     set(handles.list_object,'String',{'1-PLANE'});
    2458     set(handles.list_object,'Value',1);
     2456    set(handles.list_object_1,'String',{'1-PLANE'});
     2457    set(handles.list_object_1,'Value',1);
    24592458end
    24602459
     
    24722471    ZBounds(2)=UvData.ZMax;%maximum for the Z slider
    24732472    set_object(UvData.Object{1},PlotHandles,ZBounds);
    2474     set(handles.list_object,'Value',1);
     2473    set(handles.list_object_1,'Value',1);
    24752474%multilevel case (single menuplane in a 3D space)
    24762475elseif isfield(UvData,'Z')
     
    24992498    set(handles.MaxA,'String','255')
    25002499end
    2501 IndexObj=get(handles.list_object,'Value');
     2500IndexObj=get(handles.list_object_1,'Value');
    25022501Object=UvData.Object;
    25032502IndexObj=min(IndexObj,numel(Object));
     
    34123411%     set(handles.edit,'Value',0)
    34133412%     set(handles.edit,'BackgroundColor',[0.7 0.7 0.7])
    3414 %     list_object=get(handles.list_object,'String');
    3415 %     if ~isempty(list_object)
    3416 %         set(handles.list_object,'Value',length(list_object))
     3413%     list_object_1=get(handles.list_object_1,'String');
     3414%     if ~isempty(list_object_1)
     3415%         set(handles.list_object_1,'Value',length(list_object_1))
    34173416%     end
    34183417%     MouseAction='create_object';
     
    34713470%     end
    34723471%     %set(hset_object,'Position',[pos_uvmat(1) pos_uvmat(2)-0.05*pos_uvmat(4) 0.2*pos_uvmat(3)  0.5*pos_uvmat(4)]);
    3473 %     list_object=get(handles.list_object,'String');
    3474 %     if ~isempty(list_object)
    3475 %         set(handles.list_object,'Value',length(list_object))
     3472%     list_object_1=get(handles.list_object_1,'String');
     3473%     if ~isempty(list_object_1)
     3474%         set(handles.list_object_1,'Value',length(list_object_1))
    34763475%     end
    34773476%     MouseAction='create_object';
     
    35033502% set(handles.edit,'BackgroundColor',[0.7 0.7 0.7])
    35043503% set(handles.edit,'Value',0)
    3505 % set(handles.list_object,'Value',1);
     3504% set(handles.list_object_1,'Value',1);
    35063505% edit_vect_Callback(hObject, eventdata, handles)
    35073506% set(handles.edit,'BackgroundColor',[0.7 0.7 0.7])
     
    35413540%     set(hset_object,'Position',pos_set_object)
    35423541% end
    3543 % list_object=get(handles.list_object,'String');
    3544 % if ~isempty(list_object)
    3545 %     set(handles.list_object,'Value',length(list_object))
     3542% list_object_1=get(handles.list_object_1,'String');
     3543% if ~isempty(list_object_1)
     3544%     set(handles.list_object_1,'Value',length(list_object_1))
    35463545% end
    35473546% MouseAction='create_object';
     
    36063605%         set(hset_object,'Position',pos_set_object)
    36073606%     end
    3608 %     list_object=get(handles.list_object,'String');
    3609 %     if ~isempty(list_object)
    3610 %         set(handles.list_object,'Value',length(list_object))
     3607%     list_object_1=get(handles.list_object_1,'String');
     3608%     if ~isempty(list_object_1)
     3609%         set(handles.list_object_1,'Value',length(list_object_1))
    36113610%     end
    36123611%     UvData.MouseAction='create_object';
     
    36773676% set(hset_object,'Position',pos_set_object)
    36783677% end
    3679 % list_object=get(handles.list_object,'String');
    3680 % nbobject=length(list_object);
    3681 % set(handles.list_object,'Value',nbobject)
     3678% list_object_1=get(handles.list_object_1,'String');
     3679% nbobject=length(list_object_1);
     3680% set(handles.list_object_1,'Value',nbobject)
    36823681% UvData.MouseAction='create_object';
    36833682% set(huvmat,'UserData',UvData)
     
    36913690    delete(handles.UVMAT_title)
    36923691end
    3693 huvmat=get(handles.create,'parent');
    3694 UvData=get(huvmat,'UserData');%read UvData properties stored on the uvmat interface
     3692UvData=get(handles.uvmat,'UserData');%read UvData properties stored on the uvmat interface
    36953693if isequal(get(handles.VOLUME,'Value'),1)
    36963694    set(handles.zoom,'Value',0)
     
    37003698    set(handles.edit,'Value',0)
    37013699    set(handles.edit,'BackgroundColor',[0.7 0.7 0.7])
    3702     set(handles.cal,'Value',0)
    3703     set(handles.cal,'BackgroundColor',[0 1 0])
     3700%     set(handles.cal,'Value',0)
     3701%     set(handles.cal,'BackgroundColor',[0 1 0])
    37043702    set(handles.edit_vect,'Value',0)
    37053703    edit_vect_Callback(hObject, eventdata, handles)
     
    37533751    set(handles.edit_vect,'BackgroundColor',[1 1 0])
    37543752    set(handles.edit,'Value',0)
    3755     set(handles.create,'Value',0)
    3756     set(handles.create,'BackgroundColor',[0 1 0])
     3753    set(handles.zoom,'Value',0)
     3754    set(handles.zoom,'BackgroundColor',[0.7 0.7 0.7])
     3755%     set(handles.create,'Value',0)
     3756%     set(handles.create,'BackgroundColor',[0 1 0])
    37573757    set(handles.edit,'BackgroundColor',[0.7 0.7 0.7])
    37583758    set(gcf,'Pointer','arrow')
     
    40204020function cal_Callback(hObject, eventdata, handles)
    40214021
    4022 huvmat=get(handles.cal,'parent');%handles of the uvmat interface
    4023 UvData=get(huvmat,'UserData');%read UvData properties stored on the uvmat interface
    4024 %reinitialize the edit interface associated with uvmat
    4025 value=get(handles.cal,'Value');
    4026 if value
    4027         set(handles.cal,'BackgroundColor',[1 1 0])
    4028         %suppress the other options if MENULINE is chosen
    4029         set(handles.zoom,'Value',0)
    4030         set(handles.zoom,'BackgroundColor',[0.7 0.7 0.7])
    4031         set(handles.create,'Value',0)
    4032         set(handles.create,'BackgroundColor',[0 1 0])
    4033         set(handles.create,'enable','off')     
    4034         set(handles.edit_vect,'Value',0)
    4035         set(handles.edit_vect,'enable','off')
    4036         edit_vect_Callback(hObject, eventdata, handles)
    4037         set(handles.edit,'Value',0)
    4038         set(handles.edit,'BackgroundColor',[0.7 0.7 0.7])
    4039         set(handles.edit,'enable','off')
    4040         set(handles.list_object,'Value',1)     
    4041         % initiate display of GUI geometry_calib
    4042         data=[]; %default
    4043                 if isfield(UvData,'CoordType')
    4044             data.CoordType=UvData.CoordType;
    4045         end
    4046         %data.ParentButton=handles.cal; % transmit the handles of the calling button to the GUI geometry_calib
    4047                 pos=get(huvmat,'Position');
    4048                 pos(1)=pos(1)+pos(3)-0.311+0.04; %0.311= width of the geometry_calib interface (units relative to the srcreen)
    4049                 pos(2)=pos(2)-0.02;
    4050         [FileName,RootPath,FileBase,FileIndices,FileExt,SubDir]=read_file_boxes(handles);
    4051 %         [filebase,num_i1,num_j1,num_i2,num_j2,Ext,NomType,SubDir]=read_input_file(handles);
    4052 %         [inputfile,idetect]=name_generator(filebase,num_i1,num_j1,Ext,NomType,1,num_i2,num_j2,SubDir);
    4053                 [UvData.hset_object,UvData.sethandles]=geometry_calib(handles,pos,FileName);% call the set_object interface     
    4054         pos_uvmat=get(huvmat,'Position');
    4055         %pos_cal(1:2)=UvData.CalOrigin + pos_uvmat(1:2);
    4056         if isfield(UvData,'CalOrigin')
    4057             pos_cal(1)=pos_uvmat(1)+UvData.CalOrigin(1)*pos_uvmat(3);
    4058             pos_cal(2)=pos_uvmat(2)+UvData.CalOrigin(2)*pos_uvmat(4);
    4059             pos_cal(3:4)=UvData.CalSize .* pos_uvmat(3:4);
    4060             set(UvData.hset_object,'Position',pos_cal)
    4061         end
    4062         UvData.MouseAction='calib';
    4063 else
    4064      UvData.MouseAction='none';     
    4065      hgeometry_calib=findobj(allchild(0),'Name','geometry_calib');
    4066 %      if ~isempty(hgeometry_calib)
    4067 %          answer=questdlg('close the GUI geometry-calib?');
    4068 %          if isequal(answer,'Yes')
    4069 %              delete(hgeometry_calib)
    4070 %              set(handles.cal,'BackgroundColor',[0 1 0])
    4071 %          else
    4072 %              set(handles.cal,'Value',1)% keep the calibration function active
    4073 %          end
    4074 %      end
    4075      set(handles.edit_vect,'enable','on')
    4076      set(handles.edit,'enable','on')
    4077      set(handles.create,'enable','on')
    4078 %      set(handles.LINE,'enable','on')
    4079 %      set(handles.PATCH,'enable','on')
    4080 %      set(handles.PLANE,'enable','on')
    4081 %      set(handles.VOLUME,'enable','on')
    4082      %set(handles.makemask,'enable','on')
    4083      hh=findobj(handles.axes3,'Tag','calib_points');
    4084      if ~isempty(hh)
    4085          delete(hh)
    4086      end
    4087      hhh=findobj(handles.axes3,'Tag','calib_marker');
    4088      if ~isempty(hhh)
    4089          delete(hhh)
    4090      end   
    4091 end
    4092 set(huvmat,'UserData',UvData);
     4022
    40934023
    40944024%-------------------------------------------------------------
     
    44664396function grid_Callback(hObject, eventdata, handles)
    44674397%-------------------------------------------------------------------
    4468 huvmat=get(handles.create,'parent');
    4469 UvData=get(huvmat,'UserData');%read UvData properties stored on the uvmat interface
     4398
     4399UvData=get(handles.uvmat,'UserData');%read UvData properties stored on the uvmat interface
    44704400
    44714401%suppress the other options if grid is chosen
    4472 set(handles.create,'Value',0)
    4473 set(handles.create,'BackgroundColor',[0 1 0])
     4402% set(handles.create,'Value',0)
     4403% set(handles.create,'BackgroundColor',[0 1 0])
    44744404set(handles.edit_vect,'Value',0)
    44754405edit_vect_Callback(hObject, eventdata, handles)
     
    44784408edit_vect_Callback(hObject, eventdata, handles)
    44794409set(handles.edit,'BackgroundColor',[0.7 0.7 0.7])
    4480 set(handles.list_object,'Value',1)     
     4410set(handles.list_object_1,'Value',1)     
    44814411set(handles.cal,'Value',0)
    44824412set(handles.cal,'BackgroundColor',[0 1 0])   
     
    44934423function edit_Callback(hObject, eventdata, handles)
    44944424%-------------------------------------------------------------------
    4495 huvmat=get(handles.list_object,'parent');
    4496 UvData=get(huvmat,'UserData');%read UvData properties stored on the uvmat interface
     4425UvData=get(handles.uvmat,'UserData');%read UvData properties stored on the uvmat interface
    44974426test=get(handles.edit,'Value');
    44984427if test
     
    45024431    set(handles.zoom,'Value',0)
    45034432    zoom_Callback(hObject, eventdata, handles)
    4504     set(handles.create,'Value',0)
    4505     set(handles.create,'BackgroundColor',[0 1 0])
    4506 %     set(handles.LINE,'Value',0)
    4507 %     set(handles.LINE,'BackgroundColor',[0 1 0])
    4508 %     set(handles.PATCH,'Value',0)
    4509 %     set(handles.PATCH,'BackgroundColor',[0 1 0])
    4510 %     set(handles.PLANE,'Value',0)
    4511 %     set(handles.PLANE,'BackgroundColor',[0 1 0])%put activated buttons to yellow
    4512 %     set(handles.VOLUME,'Value',0)
    4513 %     set(handles.VOLUME,'BackgroundColor',[0 1 0])
    45144433    set(handles.edit_vect,'Value',0)
    45154434    edit_vect_Callback(hObject, eventdata, handles) 
    4516     set(handles.cal,'Value',0)
    4517     set(handles.cal,'BackgroundColor',[0 1 0])   
    4518     %set(handles.grid,'Value',0)
    4519     %set(handles.grid,'BackgroundColor',[0 1 0])
    4520     list_object_Callback(hObject, eventdata, handles)
     4435    %list_object_Callback(hObject, eventdata, handles)
    45214436else
    45224437    UvData.MouseAction='none';
    45234438    set(handles.edit,'BackgroundColor',[0.7,0.7,0.7])   
    45244439end
    4525 set(huvmat,'UserData',UvData);
    4526 
    4527 %--------------------------------------------------------
    4528 % --- Executes on selection change in list_object.
    4529 %--------------------------------------------------------
    4530 function list_object_Callback(hObject, eventdata, handles)
     4440set(handles.uvmat,'UserData',UvData);
     4441hset_object=findobj(allchild(0),'Tag','set_object');
     4442if ~isempty(hset_object)
     4443    hhset_object=guidata(hset_object);
     4444    if test
     4445        set(hhset_object.PLOT,'Visible','on');
     4446    else
     4447       set(hhset_object.PLOT,'Visible','off');
     4448    end
     4449end
     4450
     4451%------------------------------------------------------------------------
     4452% --- Executes on selection change in list_object_1.
     4453function list_object_1_Callback(hObject, eventdata, handles)
     4454%------------------------------------------------------------------------
     4455list_str=get(handles.list_object_1,'String');
     4456IndexObj=get(handles.list_object_1,'Value');
     4457str_1=list_str{IndexObj};
     4458set(handles.list_object_1,'BackgroundColor',[1 1 0])
     4459set(handles.list_object_2,'BackgroundColor',[1 1 1])
     4460val_2=get(handles.list_object_2,'Value');
     4461str_2=get(handles.list_object_2,'String');
     4462if isequal(val_2,IndexObj)
     4463    set(handles.list_object_2,'Value',numel(str_2))
     4464    list_object_2_Callback(hObject, eventdata, handles)
     4465end
     4466hset_object=findobj(allchild(0),'Tag','set_object');
     4467if ~isempty(hset_object)
     4468     set(hset_object,'name',str_1);
     4469end
     4470update_object(handles,IndexObj,1)
     4471
     4472%------------------------------------------------------------------------
     4473% --- Executes on selection change in list_object_1.
     4474function list_object_2_Callback(hObject, eventdata, handles)
     4475%------------------------------------------------------------------------
     4476list_str=get(handles.list_object_2,'String');
     4477IndexObj=get(handles.list_object_2,'Value');
     4478if isequal(list_str{IndexObj},'...')
     4479    hview_field=findobj(allchild(0),'Tag','view_field')
     4480    if ~isempty(hview_field)
     4481        delete(hview_field)
     4482    end
     4483    set(handles.list_object_2,'BackgroundColor',[1 1 1])
     4484else
     4485    hset_object=findobj(allchild(0),'Tag','set_object');
     4486    if ~isempty(hset_object)
     4487        set(hset_object,'name',list_str{IndexObj});
     4488    end
     4489    set(handles.list_object_2,'BackgroundColor',[1 1 0])
     4490    set(handles.list_object_1,'BackgroundColor',[1 1 1])
     4491    update_object(handles,IndexObj,2)
     4492end
     4493
     4494%------------------------------------------------------------------------
     4495function update_object(handles,IndexObj,option)
     4496%------------------------------------------------------------------------
    45314497UvData=get(handles.uvmat,'UserData');%read UvData properties stored on the uvmat interface
    4532 list_str=get(handles.list_object,'String');
    4533 IndexObj=get(handles.list_object,'Value');
    4534 
    45354498if ~(length(UvData.Object)>=IndexObj);
    45364499    return
    45374500end
    45384501ObjectData=UvData.Object{IndexObj};
    4539 ObjectData.desable_open=1; % desable the OPEN option in the set_object GUI (editing mode)
    45404502if isequal(get(handles.edit,'Value'),0)
    45414503    ObjectData.desable_plot=1; % desable the PLOT option in the set_object GUI (editing mode
     
    45474509        ZBounds(2)=UvData.ZMax;%maximum for the Z slider
    45484510    end
    4549 AxeData.hset_object=set_object(ObjectData,PlotHandles,ZBounds);% call the set_object interface,
     4511hset_object=findobj(allchild(0),'Name','set_object');
     4512if ~isempty(hset_object)
     4513    delete(hset_object)% delete existing version of set_object
     4514end
     4515hset_object=set_object(ObjectData,PlotHandles,ZBounds);% call the set_object interface,
    45504516pos_uvmat=get(handles.uvmat,'Position');
     4517%position the set_object GUI with respect to uvmat
    45514518if isfield(UvData,'SetObjectOrigin')
    4552 pos_set_object(1:2)=UvData.SetObjectOrigin + pos_uvmat(1:2);
    4553 pos_set_object(3:4)=UvData.SetObjectSize .* pos_uvmat(3:4);
    4554 set(AxeData.hset_object,'Position',pos_set_object)
     4519    pos_set_object(1:2)=UvData.SetObjectOrigin + pos_uvmat(1:2);
     4520    pos_set_object(3:4)=UvData.SetObjectSize .* pos_uvmat(3:4);
     4521    set(hset_object,'Position',pos_set_object)
    45554522end
    45564523
    45574524%project the current field on the object and plot it
    45584525ProjData= proj_field(UvData.Field,ObjectData,IndexObj);%project the current interface field on ObjectData
    4559 if length(UvData.Object)>= IndexObj && isfield(UvData.Object{IndexObj},'plotaxes')&& ishandle(UvData.Object{IndexObj}.plotaxes)
    4560     plot_field(ProjData,UvData.Object{IndexObj}.plotaxes,PlotHandles);
    4561 else
    4562      UvData.Object{IndexObj}.plotaxes=view_field(ProjData);
    4563      set(handles.uvmat,'UserData',UvData)
     4526if option==1%length(UvData.Object)>= IndexObj && isfield(UvData.Object{IndexObj},'plotaxes')&& ishandle(UvData.Object{IndexObj}.plotaxes)
     4527    plot_field(ProjData,handles.axes3,PlotHandles);
     4528    UvData.Object{IndexObj}.plotaxes=handles.axes3;
     4529else
     4530    UvData.Object{IndexObj}.plotaxes=view_field(ProjData);
    45644531end
    45654532
     
    46174584    end
    46184585end
     4586pause(0.1)
     4587figure(hset_object)%put set_object in front
    46194588
    46204589%------------------------------------------------------
     
    47584727% ------------------------------------------------------------------
    47594728function MenuCalib_Callback(hObject, eventdata, handles)
    4760 set(handles.TOOLS_txt,'Visible','on')
    4761 set(handles.frame_tools,'Visible','on')
    4762 set(handles.cal,'Visible','on')
    4763 set(handles.cal,'Value',1)
    4764 cal_Callback(hObject,eventdata,handles)
     4729% set(handles.TOOLS_txt,'Visible','on')
     4730% set(handles.frame_tools,'Visible','on')
     4731UvData=get(handles.uvmat,'UserData');%read UvData properties stored on the uvmat interface
     4732%reinitialize the edit interface associated with uvmat
     4733%suppress the other options if MENULINE is chosen
     4734set(handles.zoom,'Value',0)
     4735set(handles.zoom,'BackgroundColor',[0.7 0.7 0.7])
     4736%         set(handles.create,'Value',0)
     4737%         set(handles.create,'BackgroundColor',[0 1 0])
     4738%         set(handles.create,'enable','off')     
     4739set(handles.edit_vect,'Value',0)
     4740set(handles.edit_vect,'enable','off')
     4741edit_vect_Callback(hObject, eventdata, handles)
     4742set(handles.edit,'Value',0)
     4743set(handles.edit,'BackgroundColor',[0.7 0.7 0.7])
     4744set(handles.edit,'enable','off')
     4745set(handles.list_object_1,'Value',1)     
     4746% initiate display of GUI geometry_calib
     4747data=[]; %default
     4748if isfield(UvData,'CoordType')
     4749    data.CoordType=UvData.CoordType;
     4750end
     4751pos=get(handles.uvmat,'Position');
     4752pos(1)=pos(1)+pos(3)-0.311+0.04; %0.311= width of the geometry_calib interface (units relative to the srcreen)
     4753pos(2)=pos(2)-0.02;
     4754[FileName,RootPath,FileBase,FileIndices,FileExt,SubDir]=read_file_boxes(handles);
     4755[UvData.hset_object,UvData.sethandles]=geometry_calib(handles,pos,FileName);% call the set_object interface     
     4756pos_uvmat=get(handles.uvmat,'Position');
     4757%pos_cal(1:2)=UvData.CalOrigin + pos_uvmat(1:2);
     4758if isfield(UvData,'CalOrigin')
     4759    pos_cal(1)=pos_uvmat(1)+UvData.CalOrigin(1)*pos_uvmat(3);
     4760    pos_cal(2)=pos_uvmat(2)+UvData.CalOrigin(2)*pos_uvmat(4);
     4761    pos_cal(3:4)=UvData.CalSize .* pos_uvmat(3:4);
     4762    set(UvData.hset_object,'Position',pos_cal)
     4763end
     4764UvData.MouseAction='calib';
     4765set(handles.uvmat,'UserData',UvData);
     4766
    47654767
    47664768% ------------------------------------------------------------------
     
    47684770set(handles.TOOLS_txt,'Visible','on')
    47694771set(handles.frame_tools,'Visible','on')
    4770 set(handles.create,'Visible','on')
    4771 set(handles.create,'Value',1)
    4772 set(handles.create,'BackgroundColor',[1 1 0]) %visualise in yellow
     4772% set(handles.create,'Visible','on')
     4773% set(handles.create,'Value',1)
     4774% set(handles.create,'BackgroundColor',[1 1 0]) %visualise in yellow
    47734775set(handles.save_mask,'Visible','on')
    47744776set(handles.masklevel,'Visible','on')
     
    47904792    delete(handles.UVMAT_title)
    47914793end
    4792 huvmat=get(handles.create,'parent');
    4793 UvData=get(huvmat,'UserData');%read UvData properties stored on the uvmat interface
     4794% huvmat=get(handles.create,'parent');
     4795UvData=get(handles.uvmat,'UserData');%read UvData properties stored on the uvmat interface
    47944796set(handles.zoom,'Value',0)
    47954797set(handles.zoom,'BackgroundColor',[0.7 0.7 0.7])
     
    48004802set(handles.edit_vect,'Value',0) 
    48014803edit_vect_Callback(hObject, eventdata, handles)
    4802 set(handles.cal,'Value',0)
    4803 set(handles.cal,'BackgroundColor',[0 1 0])
     4804% set(handles.cal,'Value',0)
     4805% set(handles.cal,'BackgroundColor',[0 1 0])
    48044806
    48054807%initiate the GUI set_object
     
    48204822PlotHandles=get_plot_handles(handles);%get the handles of the graphic objects setting the plotting parameters
    48214823[hset_object,UvData.sethandles]=set_object(data,PlotHandles);% call the set_object interface
    4822 pos_uvmat=get(huvmat,'Position');
     4824pos_uvmat=get(handles.huvmat,'Position');
    48234825if isfield(UvData,'SetObjectOrigin')
    48244826    pos_set_object(1:2)=UvData.SetObjectOrigin + pos_uvmat(1:2);
     
    48264828    set(hset_object,'Position',pos_set_object)
    48274829end
    4828 list_object=get(handles.list_object,'String');
     4830list_object=get(handles.list_object_1,'String');
    48294831if ~isempty(list_object)
    4830     set(handles.list_object,'Value',length(list_object))
     4832    set(handles.list_object_1,'Value',length(list_object))
    48314833end
    48324834UvData.MouseAction='create_object';
    4833 set(huvmat,'UserData',UvData);
     4835set(handles.uvmat,'UserData',UvData);
    48344836
    48354837% ------------------------------------------------------------------
     
    50085010% ------------------------------------------------------------------
    50095011function Menuvolume_Callback(hObject, eventdata, handles)
    5010 set(handles.create,'Visible','on')
    5011 set(handles.create,'Value',1)
     5012% set(handles.create,'Visible','on')
     5013% set(handles.create,'Value',1)
    50125014VOLUME_Callback(hObject,eventdata,handles)
    50135015
     
    50395041end
    50405042[hset_object,UvData.sethandles]=set_object(data,PlotHandles);% call the set_object interface
     5043%position the set_object GUI with respect to uvmat
     5044pos_uvmat=get(handles.uvmat,'Position');
     5045if isfield(UvData,'SetObjectOrigin')
     5046    pos_set_object(1:2)=UvData.SetObjectOrigin + pos_uvmat(1:2);
     5047    pos_set_object(3:4)=UvData.SetObjectSize .* pos_uvmat(3:4);
     5048    set(hset_object,'Position',pos_set_object)
     5049end
     5050set(handles.edit,'Value',0); %suppress the object edit mode
     5051set(handles.edit,'BackgroundColor',[0.7,0.7,0.7]) 
    50415052UvData.MouseAction='create_object';
    50425053set(handles.uvmat,'UserData',UvData)
     
    50505061end
    50515062UvData=get(handles.uvmat,'UserData');
     5063set(handles.edit,'Value',0); %suppress the object edit mode
     5064set(handles.edit,'BackgroundColor',[0.7,0.7,0.7]) 
    50525065if isfield(UvData,'CoordType')
    50535066    data.CoordType=UvData.CoordType;
     
    50805093PlotHandles=get_plot_handles(handles);%get the handles of the interface elements setting the plotting parameters
    50815094[hset_object,UvData.sethandles]=set_object(data,PlotHandles);% call the set_object interface
     5095
     5096pos_uvmat=get(handles.uvmat,'Position');
     5097%position the set_object GUI with respect to uvmat
     5098if isfield(UvData,'SetObjectOrigin')
     5099    pos_set_object(1:2)=UvData.SetObjectOrigin + pos_uvmat(1:2);
     5100    pos_set_object(3:4)=UvData.SetObjectSize .* pos_uvmat(3:4);
     5101    set(hset_object,'Position',pos_set_object)
     5102end
     5103
    50825104UvData.MouseAction='create_object';
    50835105set(handles.uvmat,'UserData',UvData)
     
    50955117set(handles.uvmat,'UserData',UvData);
    50965118
    5097 
Note: See TracChangeset for help on using the changeset viewer.