Changeset 675 for trunk/src/set_object.m
- Timestamp:
- Aug 27, 2013, 11:25:21 PM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/set_object.m
r674 r675 270 270 %------------------------------------------------------------------------ 271 271 % --- Executes on selection change in ProjMode. 272 %------------------------------------------------------------------------ 273 272 274 function ProjMode_Callback(hObject, eventdata, handles) 273 275 menu=get(handles.ProjMode,'String'); … … 305 307 switch ObjectStyle 306 308 case 'points' 307 set(handles.num_RangeY_2,'TooltipString','num_ YMax: range of projection around each point')309 set(handles.num_RangeY_2,'TooltipString','num_RangeY_2: range of projection around each point') 308 310 % set(handles.XObject,'TooltipString','XObject: set of x coordinates of the points') 309 311 % set(handles.YObject,'TooltipString','YObject: set of y coordinates of the points') 310 312 % set(handles.ZObject,'TooltipString','ZObject: set of z coordinates of the points') 311 313 case {'line','polyline','polygon'} 312 set(handles.num_RangeY_2,'TooltipString','num_ YMax: range of projection around the line')314 set(handles.num_RangeY_2,'TooltipString','num_RangeY_2: range of projection around the line') 313 315 set(handles.Coord,'TooltipString','Coord: table of x,y, z coordinates defining the line') 314 316 % set(handles.YObject,'TooltipString','YObject: set of y coordinates defining the line') … … 319 321 end 320 322 case {'rectangle','ellipse'} 321 set(handles.num_RangeX_2,'TooltipString',['num_ XMax: half length of the ' ObjectStyle])322 set(handles.num_RangeY_2,'TooltipString',['num_ YMax: half width of the ' ObjectStyle])323 set(handles.num_RangeX_2,'TooltipString',['num_RangeX_2: half length of the ' ObjectStyle]) 324 set(handles.num_RangeY_2,'TooltipString',['num_RangeY_2: half width of the ' ObjectStyle]) 323 325 % set(handles.XObject,'TooltipString',['XObject: x coordinate of the ' Type ' centre']) 324 326 % set(handles.YObject,'TooltipString',['YObject: y coordinate of the ' Type ' centre']) … … 636 638 dir_save=uigetfile_uvmat('select the folder for the new xml object file:',RootPath,'uigetdir'); 637 639 if ~isempty(dir_save) 638 % dir_save=uigetdir(RootPath);639 640 ObjectName=get(handles.Name,'String'); 640 641 if ~isempty(ObjectName)&&~strcmp(ObjectName,'') 641 def= {fullfile(dir_save,[ObjectName '.xml'])};642 def=[ObjectName '.xml']; 642 643 else 643 def= {fullfile(dir_save,[Object.Style '.xml'])};644 end 645 displ_txt= 'save object as an .xml file';%default display644 def=[Object.Style '.xml']; 645 end 646 displ_txt={'save object as an .xml file in';dir_save};%default display 646 647 menu=get(handles.ProjMode,'String'); 647 648 value=get(handles.ProjMode,'Value'); 648 649 ProjMode=menu{value}; 649 650 if strcmp(ProjMode,'mask_inside')||strcmp(ProjMode,'mask_outside') 650 displ_txt='save mask contour as an .xml file: to create a mask image, use save_mask on the GUI uvmat (lower right)'; 651 end 652 answer=msgbox_uvmat('INPUT_TXT','save object as an .xml file',def); 653 if ~isempty(answer) 651 displ_txt={'save mask contour as an .xml file:'; 'to create a mask image, use save_mask on the GUI uvmat (lower right)'}; 652 end 653 answer=msgbox_uvmat('INPUT_TXT',displ_txt,def); 654 if iscell(answer) 655 FullName=fullfile(dir_save,answer{1}); 654 656 t=struct2xml(Object); 655 657 t=set(t,1,'name','ProjObject'); 656 save(t, answer{1})657 end658 msgbox_uvmat('CONFIRMATION',[answer{1} ' saved'])658 save(t,FullName) 659 msgbox_uvmat('CONFIRMATION',[FullName ' saved']) 660 end 659 661 end 660 662
Note: See TracChangeset
for help on using the changeset viewer.