Changeset 589 for trunk/src/uvmat.m


Ignore:
Timestamp:
Mar 16, 2013, 3:46:12 PM (11 years ago)
Author:
sommeria
Message:

various minor corrections made

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/uvmat.m

    r586 r589  
    917917        if isfield(XmlData, 'GeometryCalib') && ~isempty(XmlData.GeometryCalib)
    918918            if isfield(XmlData.GeometryCalib,'VolumeScan') && isequal(XmlData.GeometryCalib.VolumeScan,'y')
    919                 set (handles.num_NbSlice,'String','volume')
     919                set (handles.slices,'String','volume')
    920920            end
    921921            hgeometry_calib=findobj('tag','geometry_calib');
     
    996996           end
    997997           if isfield(GeometryCalib,'VolumeScan') && isequal(GeometryCalib.VolumeScan,'y')
    998                set(handles.num_NbSlice,'String','volume')
     998               set(handles.num_NbSlice,'Visible','off')
    999999           else
     1000               set(handles.num_NbSlice,'Visible','on')
    10001001               set(handles.num_NbSlice,'String',num2str(NbSlice))
    10011002           end
     
    11261127%------------------------------------------------------------------------
    11271128if get(handles.scan_i,'Value')==1
    1128     set(handles.scan_i,'BackgroundColor',[1 1 0])
     1129%     set(handles.scan_i,'BackgroundColor',[1 1 0])
    11291130    set(handles.scan_j,'Value',0)
    11301131else
    1131     set(handles.scan_i,'BackgroundColor',[0.831 0.816 0.784])
     1132%     set(handles.scan_i,'BackgroundColor',[0.831 0.816 0.784])
    11321133    set(handles.scan_j,'Value',1)
    11331134end
     
    11391140%------------------------------------------------------------------------
    11401141if get(handles.scan_j,'Value')==1
    1141     set(handles.scan_j,'BackgroundColor',[1 1 0])
     1142%     set(handles.scan_j,'BackgroundColor',[1 1 0])
    11421143    set(handles.scan_i,'Value',0)
    1143     set(handles.scan_i,'BackgroundColor',[0.831 0.816 0.784])
     1144%     set(handles.scan_i,'BackgroundColor',[0.831 0.816 0.784])
    11441145%     NomType=get(handles.NomType,'String');
    11451146%     switch NomType
     
    11501151%     end
    11511152else
    1152     set(handles.scan_j,'BackgroundColor',[0.831 0.816 0.784])
     1153%     set(handles.scan_j,'BackgroundColor',[0.831 0.816 0.784])
    11531154    set(handles.scan_i,'Value',1)
    1154     set(handles.scan_i,'BackgroundColor',[1 1 0])
     1155%     set(handles.scan_i,'BackgroundColor',[1 1 0])
    11551156    set(handles.CheckFixPair,'Visible','off')
    11561157end
     
    12221223function slices_Callback(hObject, eventdata, handles)
    12231224%------------------------------------------------------------------------
    1224 if get(handles.slices,'Value')==1
    1225     set(handles.slices,'BackgroundColor',[1 1 0])
    1226     set(handles.num_NbSlice,'Visible','on')
    1227     set(handles.z_text,'Visible','on')
    1228     set(handles.z_index,'Visible','on')
    1229     num_NbSlice_Callback(hObject, eventdata, handles)
    1230 else
    1231     set(handles.num_NbSlice,'Visible','off')
    1232     set(handles.slices,'BackgroundColor',[0.7 0.7 0.7])
    1233     set(handles.z_text,'Visible','off')
    1234     set(handles.z_index,'Visible','off')
    1235     set(handles.masklevel,'Value',1)
    1236     set(handles.masklevel,'String',{'1'})
     1225if strcmp(get(handles.slices,'String'),'slices')
     1226    if get(handles.slices,'Value')==1
     1227        set(handles.num_NbSlice,'Visible','on')
     1228        set(handles.z_text,'Visible','on')
     1229        set(handles.z_index,'Visible','on')
     1230        num_NbSlice_Callback(hObject, eventdata, handles)
     1231    else
     1232        set(handles.num_NbSlice,'Visible','off')
     1233        set(handles.z_text,'Visible','off')
     1234        set(handles.z_index,'Visible','off')
     1235        set(handles.masklevel,'Value',1)
     1236        set(handles.masklevel,'String',{'1'})
     1237    end
    12371238end
    12381239
     
    12401241function num_NbSlice_Callback(hObject, eventdata, handles)
    12411242%------------------------------------------------------------------------
     1243mode=get(handles.slices,'String');
    12421244nb_slice_str=get(handles.num_NbSlice,'String');
    1243 if isequal(nb_slice_str,'volume')
    1244     num=stra2num(get(handles.j1,'String'));
    1245     last_j=get(handles.last_j,'String');
    1246     nbslice=str2double(last_j{1});
     1245if strcmp(mode,'volume')
     1246    z=stra2num(get(handles.j1,'String'));
    12471247else
    12481248    num=str2double(get(handles.i1,'String'));
    12491249    nbslice=str2double(get(handles.num_NbSlice,'String'));
    1250 end
    1251 z=mod(num-1,nbslice)+1;
     1250    z=mod(num-1,nbslice)+1;
     1251end
    12521252set(handles.z_index,'String',num2str(z))
    12531253for ilist=1:nbslice
     
    13221322            if mdetect
    13231323                set(handles.num_NbSlice,'String',Name(i+1:ind_mask-1));
    1324                 set(handles.num_NbSlice,'BackgroundColor',[1 1 0])
     1324                 set(handles.num_NbSlice,'BackgroundColor',[1 1 0])
    13251325                set(handles.CheckMask,'UserData',Mask);
    13261326                set(handles.CheckMask,'BackgroundColor',[1 1 0])
     
    20432043end
    20442044%update the z position index
    2045 nbslice_str=get(handles.num_NbSlice,'String');
    2046 if isequal(nbslice_str,'volume')%NOT USED
     2045mode_slice=get(handles.slices,'String');
     2046if strcmp(mode_slice,'volume')
    20472047    z_index=num_j1;
    20482048    set(handles.z_index,'String',num2str(z_index))
    20492049else
    2050     nbslice=str2num(nbslice_str);
     2050    nbslice=str2num(get(handles.num_NbSlice,'String'));
    20512051    z_index=mod(num_i1-1,nbslice)+1;
    20522052    set(handles.z_index,'String',num2str(z_index))
     
    28842884%-------------------------------------------------------------------
    28852885if get(handles.CheckFixAspectRatio,'Value')
    2886     set(handles.CheckFixAspectRatio,'BackgroundColor',[1 1 0])
     2886%     set(handles.CheckFixAspectRatio,'BackgroundColor',[1 1 0])
    28872887    update_plot(handles);
    28882888else
    2889     set(handles.CheckFixAspectRatio,'BackgroundColor',[0.7 0.7 0.7])
     2889%     set(handles.CheckFixAspectRatio,'BackgroundColor',[0.7 0.7 0.7])
    28902890    update_plot(handles);
    28912891end
     
    28952895%-------------------------------------------------------------------
    28962896set(handles.CheckFixAspectRatio,'Value',1)% select the fixed aspect ratio button
    2897 set(handles.CheckFixAspectRatio,'BackgroundColor',[1 1 0])% mark in yellow
     2897% set(handles.CheckFixAspectRatio,'BackgroundColor',[1 1 0])% mark in yellow
    28982898update_plot(handles);
    28992899%-------------------------------------------------------------------
     
    51655165% --- Executes on button press in CheckColorBar.
    51665166function CheckColorBar_Callback(hObject, eventdata, handles)
    5167 
Note: See TracChangeset for help on using the changeset viewer.