Changeset 46 for trunk/src/set_grid.m
- Timestamp:
- Mar 15, 2010, 5:42:11 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/set_grid.m
r38 r46 288 288 t=xmltree(fileinput); 289 289 s=convert(t); 290 %Display title291 title=set_title(s.Style,s.ProjMode);%update the title292 % menu=get(handles.TITLE,'String')293 % for iline=1:length(menu)294 % if isequal(menu{iline},title)295 % set(handles.TITLE,'Value',iline)296 % break297 % end298 % end299 % TITLE_Callback(hObject, eventdata, handles)300 % teststyle=0;301 % if isfield(s,'Style')302 % menu=get(handles.ObjectStyle,'String');303 % for iline=1:length(menu)304 % if isequal(menu{iline},s.Style)305 % set(handles.ObjectStyle,'Value',iline)306 % teststyle=1;307 % break308 % end309 % end310 % end311 % if teststyle==0;312 % s.Style='points';313 % set(handles.ObjectStyle,'Value',1); %default (points)314 % end315 290 testmode=0; 316 291 if isfield(s,'ProjMode') … … 476 451 imageB=get(handles.image_2,'String'); 477 452 testB=1; 478 if isempty(imageA) | isequal(imageA,'')479 if isempty(imageB) | isequal(imageB,'')453 if isempty(imageA) || isequal(imageA,'') 454 if isempty(imageB) || isequal(imageB,'') 480 455 msgbox_uvmat('ERROR','at least one image file name must be introduced') 481 456 else … … 494 469 end 495 470 [Pathsub,RootFile,field_count,str2,str_a,str_b,ext,nom_type,subdir]=name2display(imageA); 496 form=imformats(ext( [2:end]));471 form=imformats(ext(2:end)); 497 472 if isempty(form)% if the extension corresponds to an image format recognized by Matlab 498 msgbox_uvmat('ERROR',['error in read_image.m: ' imageA ' is not an image name recognized by Matlab '])473 msgbox_uvmat('ERROR',['error: ' imageA ' is not an image name recognized by Matlab ']) 499 474 return 500 475 end … … 524 499 form=imformats(ext([2:end])); 525 500 if isempty(form)% if the extension corresponds to an image format recognized by Matlab 526 msgbox_uvmat('ERROR',['error in read_image.m: ' imageB ' is not an image name recognized by Matlab '])501 msgbox_uvmat('ERROR',['error: ' imageB ' is not an image name recognized by Matlab ']) 527 502 return 528 503 end … … 601 576 602 577 603 %------------------------------------------------604 function TITLE=set_title(Style,ProjMode)605 %------------------------------------------------606 if isequal(Style,'points')607 TITLE='POINTS';608 elseif isequal(Style,'line')|isequal(Style,'polyline')609 TITLE='LINE';610 elseif isequal(Style,'plane')611 TITLE='PLANE';612 elseif isequal(Style,'volume')613 TITLE='VOLUME';614 elseif isequal(Style,'polygon')|isequal(Style,'rectangle')|isequal(Style,'ellipse')615 if isequal(ProjMode,'inside')|isequal(ProjMode,'outside')616 TITLE='PATCH';617 else618 TITLE='LINE';619 end620 end621 622 623 578 % --- Executes on slider movement. 624 579 function z_slider_Callback(hObject, eventdata, handles)
Note: See TracChangeset
for help on using the changeset viewer.