Changeset 589 for trunk/src/uvmat.m
- Timestamp:
- Mar 16, 2013, 3:46:12 PM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/uvmat.m
r586 r589 917 917 if isfield(XmlData, 'GeometryCalib') && ~isempty(XmlData.GeometryCalib) 918 918 if isfield(XmlData.GeometryCalib,'VolumeScan') && isequal(XmlData.GeometryCalib.VolumeScan,'y') 919 set (handles. num_NbSlice,'String','volume')919 set (handles.slices,'String','volume') 920 920 end 921 921 hgeometry_calib=findobj('tag','geometry_calib'); … … 996 996 end 997 997 if isfield(GeometryCalib,'VolumeScan') && isequal(GeometryCalib.VolumeScan,'y') 998 set(handles.num_NbSlice,' String','volume')998 set(handles.num_NbSlice,'Visible','off') 999 999 else 1000 set(handles.num_NbSlice,'Visible','on') 1000 1001 set(handles.num_NbSlice,'String',num2str(NbSlice)) 1001 1002 end … … 1126 1127 %------------------------------------------------------------------------ 1127 1128 if get(handles.scan_i,'Value')==1 1128 set(handles.scan_i,'BackgroundColor',[1 1 0])1129 % set(handles.scan_i,'BackgroundColor',[1 1 0]) 1129 1130 set(handles.scan_j,'Value',0) 1130 1131 else 1131 set(handles.scan_i,'BackgroundColor',[0.831 0.816 0.784])1132 % set(handles.scan_i,'BackgroundColor',[0.831 0.816 0.784]) 1132 1133 set(handles.scan_j,'Value',1) 1133 1134 end … … 1139 1140 %------------------------------------------------------------------------ 1140 1141 if get(handles.scan_j,'Value')==1 1141 set(handles.scan_j,'BackgroundColor',[1 1 0])1142 % set(handles.scan_j,'BackgroundColor',[1 1 0]) 1142 1143 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]) 1144 1145 % NomType=get(handles.NomType,'String'); 1145 1146 % switch NomType … … 1150 1151 % end 1151 1152 else 1152 set(handles.scan_j,'BackgroundColor',[0.831 0.816 0.784])1153 % set(handles.scan_j,'BackgroundColor',[0.831 0.816 0.784]) 1153 1154 set(handles.scan_i,'Value',1) 1154 set(handles.scan_i,'BackgroundColor',[1 1 0])1155 % set(handles.scan_i,'BackgroundColor',[1 1 0]) 1155 1156 set(handles.CheckFixPair,'Visible','off') 1156 1157 end … … 1222 1223 function slices_Callback(hObject, eventdata, handles) 1223 1224 %------------------------------------------------------------------------ 1224 if get(handles.slices,'Value')==11225 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 else1231 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'})1225 if 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 1237 1238 end 1238 1239 … … 1240 1241 function num_NbSlice_Callback(hObject, eventdata, handles) 1241 1242 %------------------------------------------------------------------------ 1243 mode=get(handles.slices,'String'); 1242 1244 nb_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}); 1245 if strcmp(mode,'volume') 1246 z=stra2num(get(handles.j1,'String')); 1247 1247 else 1248 1248 num=str2double(get(handles.i1,'String')); 1249 1249 nbslice=str2double(get(handles.num_NbSlice,'String')); 1250 end 1251 z=mod(num-1,nbslice)+1; 1250 z=mod(num-1,nbslice)+1; 1251 end 1252 1252 set(handles.z_index,'String',num2str(z)) 1253 1253 for ilist=1:nbslice … … 1322 1322 if mdetect 1323 1323 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]) 1325 1325 set(handles.CheckMask,'UserData',Mask); 1326 1326 set(handles.CheckMask,'BackgroundColor',[1 1 0]) … … 2043 2043 end 2044 2044 %update the z position index 2045 nbslice_str=get(handles.num_NbSlice,'String');2046 if isequal(nbslice_str,'volume')%NOT USED2045 mode_slice=get(handles.slices,'String'); 2046 if strcmp(mode_slice,'volume') 2047 2047 z_index=num_j1; 2048 2048 set(handles.z_index,'String',num2str(z_index)) 2049 2049 else 2050 nbslice=str2num( nbslice_str);2050 nbslice=str2num(get(handles.num_NbSlice,'String')); 2051 2051 z_index=mod(num_i1-1,nbslice)+1; 2052 2052 set(handles.z_index,'String',num2str(z_index)) … … 2884 2884 %------------------------------------------------------------------- 2885 2885 if get(handles.CheckFixAspectRatio,'Value') 2886 set(handles.CheckFixAspectRatio,'BackgroundColor',[1 1 0])2886 % set(handles.CheckFixAspectRatio,'BackgroundColor',[1 1 0]) 2887 2887 update_plot(handles); 2888 2888 else 2889 set(handles.CheckFixAspectRatio,'BackgroundColor',[0.7 0.7 0.7])2889 % set(handles.CheckFixAspectRatio,'BackgroundColor',[0.7 0.7 0.7]) 2890 2890 update_plot(handles); 2891 2891 end … … 2895 2895 %------------------------------------------------------------------- 2896 2896 set(handles.CheckFixAspectRatio,'Value',1)% select the fixed aspect ratio button 2897 set(handles.CheckFixAspectRatio,'BackgroundColor',[1 1 0])% mark in yellow2897 % set(handles.CheckFixAspectRatio,'BackgroundColor',[1 1 0])% mark in yellow 2898 2898 update_plot(handles); 2899 2899 %------------------------------------------------------------------- … … 5165 5165 % --- Executes on button press in CheckColorBar. 5166 5166 function CheckColorBar_Callback(hObject, eventdata, handles) 5167
Note: See TracChangeset
for help on using the changeset viewer.