Changeset 61 for trunk/src/uvmat.m
- Timestamp:
- Mar 24, 2010, 12:51:51 AM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/uvmat.m
r60 r61 246 246 if ~isfield(UvData.Object{1},'plotaxes') 247 247 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); 250 250 end 251 251 … … 379 379 set(handles.OBJECT_txt,'Visible','on') 380 380 set(handles.edit,'Visible','on') 381 set(handles.list_object ,'Visible','on')381 set(handles.list_object_1,'Visible','on') 382 382 set(handles.frame_object,'Visible','on') 383 383 else … … 598 598 set(handles.OBJECT_txt,'Visible','on') 599 599 set(handles.edit,'Visible','on') 600 set(handles.list_object ,'Visible','on')600 set(handles.list_object_1,'Visible','on') 601 601 set(handles.frame_object,'Visible','on') 602 602 % initiate input file: … … 647 647 drawnow 648 648 set(handles.Fields,'UserData',[])% reinialize data from uvmat opening 649 %huvmat=get(handles.RootPath,'parent');650 649 UvData=get(handles.uvmat,'UserData');%huvmat=handles of the uvmat interface 651 650 UvData.NewSeries=1; %flag for run0: begin a new series … … 920 919 function MenuBrowse_1_Callback(hObject, eventdata, handles) 921 920 %------------------------------------------------------------------- 922 huvmat=get(handles.run0,'parent');923 UvData=get(h uvmat,'UserData');921 % huvmat=get(handles.run0,'parent'); 922 UvData=get(handles.uvmat,'UserData'); 924 923 925 924 RootPath=get(handles.RootPath,'String'); … … 1142 1141 set(handles.RootPath_1,'BackgroundColor',[1 1 0])% indicate active program by yellow color 1143 1142 drawnow 1144 huvmat=get(handles.RootPath,'parent');1145 UvData=get(h uvmat,'UserData');%huvmat=handles of the uvmat interface1143 %huvmat=get(handles.RootPath,'parent'); 1144 UvData=get(handles.uvmat,'UserData');%huvmat=handles of the uvmat interface 1146 1145 UvData.NewSeries=1; %flag for run0: begin a new series 1147 1146 … … 1279 1278 end 1280 1279 UvData.XmlData_1=XmlData; 1281 set(h uvmat,'UserData',UvData)%update the data attached to the uvmat interface1280 set(handles.uvmat,'UserData',UvData)%update the data attached to the uvmat interface 1282 1281 1283 1282 if ~isequal(warntext,'') … … 1476 1475 end 1477 1476 set(handles.mask_test,'UserData',[]) 1478 huvmat=get(handles.mask_test,'parent');1479 UvData=get(h uvmat,'UserData');1477 %huvmat=get(handles.mask_test,'parent'); 1478 UvData=get(handles.uvmat,'UserData'); 1480 1479 if isfield(UvData,'MaskName') 1481 1480 UvData=rmfield(UvData,'MaskName'); 1482 set(h uvmat,'UserData',UvData)1481 set(handles.uvmat,'UserData',UvData) 1483 1482 end 1484 1483 set(handles.mask_test,'BackgroundColor',[0.7 0.7 0.7]) … … 2455 2454 if ~isfield(UvData.Object{1},'plotaxes') 2456 2455 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); 2459 2458 end 2460 2459 … … 2472 2471 ZBounds(2)=UvData.ZMax;%maximum for the Z slider 2473 2472 set_object(UvData.Object{1},PlotHandles,ZBounds); 2474 set(handles.list_object ,'Value',1);2473 set(handles.list_object_1,'Value',1); 2475 2474 %multilevel case (single menuplane in a 3D space) 2476 2475 elseif isfield(UvData,'Z') … … 2499 2498 set(handles.MaxA,'String','255') 2500 2499 end 2501 IndexObj=get(handles.list_object ,'Value');2500 IndexObj=get(handles.list_object_1,'Value'); 2502 2501 Object=UvData.Object; 2503 2502 IndexObj=min(IndexObj,numel(Object)); … … 3412 3411 % set(handles.edit,'Value',0) 3413 3412 % 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)) 3417 3416 % end 3418 3417 % MouseAction='create_object'; … … 3471 3470 % end 3472 3471 % %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)) 3476 3475 % end 3477 3476 % MouseAction='create_object'; … … 3503 3502 % set(handles.edit,'BackgroundColor',[0.7 0.7 0.7]) 3504 3503 % set(handles.edit,'Value',0) 3505 % set(handles.list_object ,'Value',1);3504 % set(handles.list_object_1,'Value',1); 3506 3505 % edit_vect_Callback(hObject, eventdata, handles) 3507 3506 % set(handles.edit,'BackgroundColor',[0.7 0.7 0.7]) … … 3541 3540 % set(hset_object,'Position',pos_set_object) 3542 3541 % 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)) 3546 3545 % end 3547 3546 % MouseAction='create_object'; … … 3606 3605 % set(hset_object,'Position',pos_set_object) 3607 3606 % 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)) 3611 3610 % end 3612 3611 % UvData.MouseAction='create_object'; … … 3677 3676 % set(hset_object,'Position',pos_set_object) 3678 3677 % 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) 3682 3681 % UvData.MouseAction='create_object'; 3683 3682 % set(huvmat,'UserData',UvData) … … 3691 3690 delete(handles.UVMAT_title) 3692 3691 end 3693 huvmat=get(handles.create,'parent'); 3694 UvData=get(huvmat,'UserData');%read UvData properties stored on the uvmat interface 3692 UvData=get(handles.uvmat,'UserData');%read UvData properties stored on the uvmat interface 3695 3693 if isequal(get(handles.VOLUME,'Value'),1) 3696 3694 set(handles.zoom,'Value',0) … … 3700 3698 set(handles.edit,'Value',0) 3701 3699 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]) 3704 3702 set(handles.edit_vect,'Value',0) 3705 3703 edit_vect_Callback(hObject, eventdata, handles) … … 3753 3751 set(handles.edit_vect,'BackgroundColor',[1 1 0]) 3754 3752 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]) 3757 3757 set(handles.edit,'BackgroundColor',[0.7 0.7 0.7]) 3758 3758 set(gcf,'Pointer','arrow') … … 4020 4020 function cal_Callback(hObject, eventdata, handles) 4021 4021 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 4093 4023 4094 4024 %------------------------------------------------------------- … … 4466 4396 function grid_Callback(hObject, eventdata, handles) 4467 4397 %------------------------------------------------------------------- 4468 huvmat=get(handles.create,'parent'); 4469 UvData=get(h uvmat,'UserData');%read UvData properties stored on the uvmat interface4398 4399 UvData=get(handles.uvmat,'UserData');%read UvData properties stored on the uvmat interface 4470 4400 4471 4401 %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]) 4474 4404 set(handles.edit_vect,'Value',0) 4475 4405 edit_vect_Callback(hObject, eventdata, handles) … … 4478 4408 edit_vect_Callback(hObject, eventdata, handles) 4479 4409 set(handles.edit,'BackgroundColor',[0.7 0.7 0.7]) 4480 set(handles.list_object ,'Value',1)4410 set(handles.list_object_1,'Value',1) 4481 4411 set(handles.cal,'Value',0) 4482 4412 set(handles.cal,'BackgroundColor',[0 1 0]) … … 4493 4423 function edit_Callback(hObject, eventdata, handles) 4494 4424 %------------------------------------------------------------------- 4495 huvmat=get(handles.list_object,'parent'); 4496 UvData=get(huvmat,'UserData');%read UvData properties stored on the uvmat interface 4425 UvData=get(handles.uvmat,'UserData');%read UvData properties stored on the uvmat interface 4497 4426 test=get(handles.edit,'Value'); 4498 4427 if test … … 4502 4431 set(handles.zoom,'Value',0) 4503 4432 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 yellow4512 % set(handles.VOLUME,'Value',0)4513 % set(handles.VOLUME,'BackgroundColor',[0 1 0])4514 4433 set(handles.edit_vect,'Value',0) 4515 4434 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) 4521 4436 else 4522 4437 UvData.MouseAction='none'; 4523 4438 set(handles.edit,'BackgroundColor',[0.7,0.7,0.7]) 4524 4439 end 4525 set(huvmat,'UserData',UvData); 4526 4527 %-------------------------------------------------------- 4528 % --- Executes on selection change in list_object. 4529 %-------------------------------------------------------- 4530 function list_object_Callback(hObject, eventdata, handles) 4440 set(handles.uvmat,'UserData',UvData); 4441 hset_object=findobj(allchild(0),'Tag','set_object'); 4442 if ~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 4449 end 4450 4451 %------------------------------------------------------------------------ 4452 % --- Executes on selection change in list_object_1. 4453 function list_object_1_Callback(hObject, eventdata, handles) 4454 %------------------------------------------------------------------------ 4455 list_str=get(handles.list_object_1,'String'); 4456 IndexObj=get(handles.list_object_1,'Value'); 4457 str_1=list_str{IndexObj}; 4458 set(handles.list_object_1,'BackgroundColor',[1 1 0]) 4459 set(handles.list_object_2,'BackgroundColor',[1 1 1]) 4460 val_2=get(handles.list_object_2,'Value'); 4461 str_2=get(handles.list_object_2,'String'); 4462 if isequal(val_2,IndexObj) 4463 set(handles.list_object_2,'Value',numel(str_2)) 4464 list_object_2_Callback(hObject, eventdata, handles) 4465 end 4466 hset_object=findobj(allchild(0),'Tag','set_object'); 4467 if ~isempty(hset_object) 4468 set(hset_object,'name',str_1); 4469 end 4470 update_object(handles,IndexObj,1) 4471 4472 %------------------------------------------------------------------------ 4473 % --- Executes on selection change in list_object_1. 4474 function list_object_2_Callback(hObject, eventdata, handles) 4475 %------------------------------------------------------------------------ 4476 list_str=get(handles.list_object_2,'String'); 4477 IndexObj=get(handles.list_object_2,'Value'); 4478 if 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]) 4484 else 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) 4492 end 4493 4494 %------------------------------------------------------------------------ 4495 function update_object(handles,IndexObj,option) 4496 %------------------------------------------------------------------------ 4531 4497 UvData=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 4535 4498 if ~(length(UvData.Object)>=IndexObj); 4536 4499 return 4537 4500 end 4538 4501 ObjectData=UvData.Object{IndexObj}; 4539 ObjectData.desable_open=1; % desable the OPEN option in the set_object GUI (editing mode)4540 4502 if isequal(get(handles.edit,'Value'),0) 4541 4503 ObjectData.desable_plot=1; % desable the PLOT option in the set_object GUI (editing mode … … 4547 4509 ZBounds(2)=UvData.ZMax;%maximum for the Z slider 4548 4510 end 4549 AxeData.hset_object=set_object(ObjectData,PlotHandles,ZBounds);% call the set_object interface, 4511 hset_object=findobj(allchild(0),'Name','set_object'); 4512 if ~isempty(hset_object) 4513 delete(hset_object)% delete existing version of set_object 4514 end 4515 hset_object=set_object(ObjectData,PlotHandles,ZBounds);% call the set_object interface, 4550 4516 pos_uvmat=get(handles.uvmat,'Position'); 4517 %position the set_object GUI with respect to uvmat 4551 4518 if 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) 4555 4522 end 4556 4523 4557 4524 %project the current field on the object and plot it 4558 4525 ProjData= 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)4526 if 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; 4529 else 4530 UvData.Object{IndexObj}.plotaxes=view_field(ProjData); 4564 4531 end 4565 4532 … … 4617 4584 end 4618 4585 end 4586 pause(0.1) 4587 figure(hset_object)%put set_object in front 4619 4588 4620 4589 %------------------------------------------------------ … … 4758 4727 % ------------------------------------------------------------------ 4759 4728 function 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') 4731 UvData=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 4734 set(handles.zoom,'Value',0) 4735 set(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') 4739 set(handles.edit_vect,'Value',0) 4740 set(handles.edit_vect,'enable','off') 4741 edit_vect_Callback(hObject, eventdata, handles) 4742 set(handles.edit,'Value',0) 4743 set(handles.edit,'BackgroundColor',[0.7 0.7 0.7]) 4744 set(handles.edit,'enable','off') 4745 set(handles.list_object_1,'Value',1) 4746 % initiate display of GUI geometry_calib 4747 data=[]; %default 4748 if isfield(UvData,'CoordType') 4749 data.CoordType=UvData.CoordType; 4750 end 4751 pos=get(handles.uvmat,'Position'); 4752 pos(1)=pos(1)+pos(3)-0.311+0.04; %0.311= width of the geometry_calib interface (units relative to the srcreen) 4753 pos(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 4756 pos_uvmat=get(handles.uvmat,'Position'); 4757 %pos_cal(1:2)=UvData.CalOrigin + pos_uvmat(1:2); 4758 if 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) 4763 end 4764 UvData.MouseAction='calib'; 4765 set(handles.uvmat,'UserData',UvData); 4766 4765 4767 4766 4768 % ------------------------------------------------------------------ … … 4768 4770 set(handles.TOOLS_txt,'Visible','on') 4769 4771 set(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 yellow4772 % set(handles.create,'Visible','on') 4773 % set(handles.create,'Value',1) 4774 % set(handles.create,'BackgroundColor',[1 1 0]) %visualise in yellow 4773 4775 set(handles.save_mask,'Visible','on') 4774 4776 set(handles.masklevel,'Visible','on') … … 4790 4792 delete(handles.UVMAT_title) 4791 4793 end 4792 huvmat=get(handles.create,'parent');4793 UvData=get(h uvmat,'UserData');%read UvData properties stored on the uvmat interface4794 % huvmat=get(handles.create,'parent'); 4795 UvData=get(handles.uvmat,'UserData');%read UvData properties stored on the uvmat interface 4794 4796 set(handles.zoom,'Value',0) 4795 4797 set(handles.zoom,'BackgroundColor',[0.7 0.7 0.7]) … … 4800 4802 set(handles.edit_vect,'Value',0) 4801 4803 edit_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]) 4804 4806 4805 4807 %initiate the GUI set_object … … 4820 4822 PlotHandles=get_plot_handles(handles);%get the handles of the graphic objects setting the plotting parameters 4821 4823 [hset_object,UvData.sethandles]=set_object(data,PlotHandles);% call the set_object interface 4822 pos_uvmat=get(h uvmat,'Position');4824 pos_uvmat=get(handles.huvmat,'Position'); 4823 4825 if isfield(UvData,'SetObjectOrigin') 4824 4826 pos_set_object(1:2)=UvData.SetObjectOrigin + pos_uvmat(1:2); … … 4826 4828 set(hset_object,'Position',pos_set_object) 4827 4829 end 4828 list_object=get(handles.list_object ,'String');4830 list_object=get(handles.list_object_1,'String'); 4829 4831 if ~isempty(list_object) 4830 set(handles.list_object ,'Value',length(list_object))4832 set(handles.list_object_1,'Value',length(list_object)) 4831 4833 end 4832 4834 UvData.MouseAction='create_object'; 4833 set(h uvmat,'UserData',UvData);4835 set(handles.uvmat,'UserData',UvData); 4834 4836 4835 4837 % ------------------------------------------------------------------ … … 5008 5010 % ------------------------------------------------------------------ 5009 5011 function 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) 5012 5014 VOLUME_Callback(hObject,eventdata,handles) 5013 5015 … … 5039 5041 end 5040 5042 [hset_object,UvData.sethandles]=set_object(data,PlotHandles);% call the set_object interface 5043 %position the set_object GUI with respect to uvmat 5044 pos_uvmat=get(handles.uvmat,'Position'); 5045 if 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) 5049 end 5050 set(handles.edit,'Value',0); %suppress the object edit mode 5051 set(handles.edit,'BackgroundColor',[0.7,0.7,0.7]) 5041 5052 UvData.MouseAction='create_object'; 5042 5053 set(handles.uvmat,'UserData',UvData) … … 5050 5061 end 5051 5062 UvData=get(handles.uvmat,'UserData'); 5063 set(handles.edit,'Value',0); %suppress the object edit mode 5064 set(handles.edit,'BackgroundColor',[0.7,0.7,0.7]) 5052 5065 if isfield(UvData,'CoordType') 5053 5066 data.CoordType=UvData.CoordType; … … 5080 5093 PlotHandles=get_plot_handles(handles);%get the handles of the interface elements setting the plotting parameters 5081 5094 [hset_object,UvData.sethandles]=set_object(data,PlotHandles);% call the set_object interface 5095 5096 pos_uvmat=get(handles.uvmat,'Position'); 5097 %position the set_object GUI with respect to uvmat 5098 if 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) 5102 end 5103 5082 5104 UvData.MouseAction='create_object'; 5083 5105 set(handles.uvmat,'UserData',UvData) … … 5095 5117 set(handles.uvmat,'UserData',UvData); 5096 5118 5097
Note: See TracChangeset
for help on using the changeset viewer.