Changeset 1072 for trunk/src/set_object.m
- Timestamp:
- Jan 17, 2020, 8:13:53 PM (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/set_object.m
r1071 r1072 100 100 101 101 % fill the interface as set in the input data: 102 if exist('data','var') 102 if exist('data','var') 103 103 if isfield(data,'Coord') 104 104 set(handles.Coord,'Data',data.Coord) 105 105 if size(data.Coord,2)==3 106 set(handles.z_slider,'Visible','on')106 set(handles.z_slider,'Visible','on') 107 107 end 108 108 else … … 114 114 if isfield(data,'ProjModeMenu') 115 115 set(handles.ProjMode,'UserData',data.ProjModeMenu)% data.ProjModeMenu as default menu (used in Type_Callback) 116 end 116 end 117 117 errormsg=fill_GUI(data,handles.set_object); 118 118 if ~isempty(errormsg) … … 120 120 return 121 121 end 122 Type_Callback(hObject, eventdata, handles)% update the GUI set_object depending on the object type 122 Type_Callback(hObject, eventdata, handles)% update the GUI set_object depending on the object type 123 123 set(handles.REFRESH,'BackgroundColor',[1 0 0]) 124 124 if isfield(data,'RangeZ') … … 151 151 set(handles.num_RangeY_1,'String',num2str(min(data.RangeY),3)) 152 152 end 153 if isfield(data,'RangeZ') && ~strcmp(data.Type,'plane_z')%TODO: generalise153 if isfield(data,'RangeZ')%&& ~strcmp(data.Type,'plane_z')%TODO: generalise 154 154 if ischar(data.RangeZ) 155 155 data.RangeZ=str2num(data.RangeZ); … … 159 159 set(handles.num_RangeZ_1,'String',num2str(min(data.RangeZ),3)) 160 160 end 161 end 161 end 162 162 if ~isfield(data,'Angle') 163 163 data.Angle=[0 0]; 164 164 end 165 % if isfield(data,'Angle') && isequal(numel(data.Angle),3)166 set(handles.num_Angle_1,'String',num2str(data.Angle(1)))167 % set(handles.num_Angle_2,'String',num2str(data.Angle(2)))168 % set(handles.num_Angle_3,'String',num2str(data.Angle(3)))169 %end165 set(handles.num_Angle_1,'String',num2str(data.Angle(1))) 166 if numel(data.Angle)==2 167 set(handles.num_Angle_2,'Visible','on') 168 set(handles.num_Angle_2,'String',num2str(data.Angle(2))) 169 end 170 170 end 171 171 set(get(handles.set_object,'children'),'enable','off') 172 172 set(handles.SAVE,'enable','on') 173 % set(handles.REFRESH,'enable','off')174 173 175 174 … … 245 244 end 246 245 case {'rectangle','ellipse','plane','volume'} 246 if ~isempty(Coord) 247 247 Coord=Coord(1,:); 248 end 248 249 end 249 250 set(handles.Coord,'Data',Coord)
Note: See TracChangeset
for help on using the changeset viewer.