Changeset 566
- Timestamp:
- Jan 30, 2013, 11:35:02 PM (12 years ago)
- Location:
- trunk/src
- Files:
-
- 3 added
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/uvmat.m
r564 r566 4594 4594 set(handles.MenuCalib,'checked','on')% indicate that MenuCalib is activated, test used by mouse action 4595 4595 4596 4597 %----------------------------------------------------------------------- 4598 function MenuLIFCalib_Callback(hObject, eventdata, handles) 4599 %------------------------------------------------------------------------ 4600 UvData=get(handles.uvmat,'UserData');%read UvData properties stored on the uvmat interface 4601 ListObj=UvData.Object; 4602 select=zeros(1,numel(ListObj)); 4603 for iobj=1:numel(ListObj); 4604 if strcmp(ListObj{iobj}.Type,'line') 4605 select(iobj)=1; 4606 end 4607 end 4608 val=find(select); 4609 if numel(val)<2 4610 msgbox_uvmat('ERROR','light rays must be defined by at least two lines created by Projection object/line in the menu bar'); 4611 return 4612 else 4613 set(handles.ListObject,'Value',val); 4614 ObjectData=UvData.Object(val); 4615 flag=1; 4616 npx=size(UvData.Field.A,2); 4617 npy=size(UvData.Field.A,1); 4618 xi=0.5:npx-0.5; 4619 yi=0.5:npy-0.5; 4620 [Xi,Yi]=meshgrid(xi,yi); 4621 for iobj=1:length(ObjectData) 4622 flagobj=1; 4623 testphys=0; %coordinates in pixels by default 4624 if isfield(ObjectData,'CoordUnit') && ~isequal(ObjectData.CoordUnit,'pixel') 4625 if isfield(UvData,'XmlData')&& isfield(UvData.XmlData{1},'GeometryCalib') 4626 Calib=UvData.XmlData{1}.GeometryCalib; 4627 testphys=1; 4628 end 4629 end 4630 if isfield(ObjectData{iobj},'Coord') 4631 x1(iobj)=ObjectData{iobj}.Coord(1,1); 4632 y1(iobj)=ObjectData{iobj}.Coord(1,2); 4633 x2(iobj)=ObjectData{iobj}.Coord(2,1); 4634 y2(iobj)=ObjectData{iobj}.Coord(2,2); 4635 end 4636 end 4637 end 4638 %determine the ray origin 4639 x1 4640 y1 4641 x2 4642 y2 4643 % update the xml file 4644 4645 4646 4596 4647 %------------------------------------------------------------------------ 4597 4648 function MenuMask_Callback(hObject, eventdata, handles) … … 4617 4668 yi=0.5:npy-0.5; 4618 4669 [Xi,Yi]=meshgrid(xi,yi); 4619 if isfield(UvData,'Object')4670 % if isfield(UvData,'Object') 4620 4671 for iobj=1:length(UvData.Object) 4621 4672 ObjectData=UvData.Object{iobj}; … … 4676 4727 end 4677 4728 end 4678 end4729 % end 4679 4730 %mask name 4680 4731 RootPath=get(handles.RootPath,'String'); … … 4846 4897 4847 4898 % Hint: get(hObject,'Value') returns toggle state of CheckColorBar 4899
Note: See TracChangeset
for help on using the changeset viewer.