Changeset 46 for trunk/src/set_grid.m


Ignore:
Timestamp:
Mar 15, 2010, 5:42:11 PM (14 years ago)
Author:
gostiaux
Message:

various bug fixes

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/set_grid.m

    r38 r46  
    288288 t=xmltree(fileinput);
    289289 s=convert(t);
    290 %Display title
    291 title=set_title(s.Style,s.ProjMode);%update the title
    292 % menu=get(handles.TITLE,'String')
    293 % for iline=1:length(menu)
    294 %      if isequal(menu{iline},title)
    295 %          set(handles.TITLE,'Value',iline)
    296 %          break
    297 %      end
    298 % end
    299 % 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 %                 break
    308 %             end
    309 %         end
    310 % end
    311 % if teststyle==0;
    312 %        s.Style='points';
    313 %        set(handles.ObjectStyle,'Value',1); %default (points)
    314 % end
    315290testmode=0;
    316291if isfield(s,'ProjMode')
     
    476451imageB=get(handles.image_2,'String');
    477452testB=1;
    478 if isempty(imageA) | isequal(imageA,'')
    479     if isempty(imageB) | isequal(imageB,'')
     453if isempty(imageA) || isequal(imageA,'')
     454    if isempty(imageB) || isequal(imageB,'')
    480455        msgbox_uvmat('ERROR','at least one image file name must be introduced')
    481456    else
     
    494469end
    495470[Pathsub,RootFile,field_count,str2,str_a,str_b,ext,nom_type,subdir]=name2display(imageA);
    496 form=imformats(ext([2:end]));
     471form=imformats(ext(2:end));
    497472if 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 '])
    499474     return
    500475end
     
    524499    form=imformats(ext([2:end]));
    525500    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 '])
    527502         return
    528503    end
     
    601576
    602577
    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     else
    618         TITLE='LINE';
    619     end
    620 end
    621 
    622 
    623578% --- Executes on slider movement.
    624579function z_slider_Callback(hObject, eventdata, handles)
Note: See TracChangeset for help on using the changeset viewer.