Changeset 158 for trunk/src/read_set_object.m
- Timestamp:
- Dec 22, 2010, 5:12:31 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/read_set_object.m
r77 r158 22 22 value=get(handles.ProjMode,'Value'); 23 23 data.ProjMode=menu{value}; 24 menu=get(handles.MenuCoord,'String');25 value=get(handles.MenuCoord,'Value');26 data.Coord Type=menu{value};24 % menu=get(handles.CoordUnit,'String'); 25 % value=get(handles.MenuCoord,'Value'); 26 data.CoordUnit=get(handles.CoordUnit,'String'); 27 27 testcalib=0; 28 28 else %default … … 33 33 %Euler angles and projection ranges 34 34 if ~testcalib 35 35 if isequal(get(handles.Phi,'Visible'),'on') 36 36 data.Phi=str2num(get(handles.Phi,'String')); 37 38 37 end 38 if isequal(get(handles.Theta,'Visible'),'on') 39 39 data.Theta=str2num(get(handles.Theta,'String')); 40 41 40 end 41 if isequal(get(handles.Psi,'Visible'),'on') 42 42 data.Psi=str2num(get(handles.Psi,'String')); 43 end 44 43 end 44 if isequal(get(handles.DX,'Visible'),'on') 45 45 data.DX=str2num(get(handles.DX,'String')); 46 47 46 end 47 if isequal(get(handles.DY,'Visible'),'on') 48 48 data.DY=str2num(get(handles.DY,'String')); 49 50 49 end 50 if isequal(get(handles.DZ,'Visible'),'on') 51 51 data.DZ=str2num(get(handles.DZ,'String')); 52 52 end … … 55 55 ZMin=str2num(get(handles.ZMin,'String')); 56 56 if ~isempty(ZMin) 57 data.RangeZ(1)=ZMin;58 dimrange=[2 3];57 data.RangeZ(1)=ZMin; 58 dimrange=[2 3]; 59 59 end 60 60 end 61 62 ZMax=str2 num(get(handles.ZMax,'String'));63 if is empty(ZMax)61 if isequal(get(handles.ZMax,'Visible'),'on') 62 ZMax=str2double(get(handles.ZMax,'String')); 63 if isnan(ZMax) 64 64 if dimrange(1)>1 65 % set(handles.ZMax,'String',get(handles.ZMin,'String'))66 65 data.RangeZ(1)=ZMax; 67 66 end 68 else 69 data.RangeZ(2)=ZMax;70 dimrange=[dimrange(1) 3];67 else 68 data.RangeZ(2)=ZMax; 69 dimrange=[dimrange(1) 3]; 71 70 end 72 71 end 73 72 if isequal(get(handles.YMin,'Visible'),'on') 74 YMin=str2num(get(handles.YMin,'String')); 75 if isempty(YMin) 76 % if dimrange(2)>2 77 % % set(handles.YMin,'String','0') 78 % data.RangeY(2)=0; 79 % end 80 else 73 YMin=str2double(get(handles.YMin,'String')); 74 if ~isnan(YMin) 81 75 data.RangeY(2)=YMin; 82 76 dimrange=[2 max(dimrange(2),2)]; … … 84 78 end 85 79 if isequal(get(handles.YMax,'Visible'),'on') 86 % data.YMax=str2num(get(handles.YMax,'String')); 87 YMax=str2num(get(handles.YMax,'String')); 88 if isempty(YMax) 89 % if dimrange(1)>1 90 % % set(handles.YMax,'String',get(handles.YMin,'String')) 91 % if ~isempty(YMin) 92 % data.RangeY(1)=YMin; 93 % end 94 % elseif dimrange(2)>2 95 % % set(handles.YMax,'String',get(handles.ZMin,'String')) 96 % data.RangeY(2)=ZMin; 97 % end 98 else 80 YMax=str2double(get(handles.YMax,'String')); 81 if ~isnan(YMax) 99 82 data.RangeY(1)=YMax; 100 83 dimrange=[dimrange(1) max(dimrange(2),2)]; … … 102 85 end 103 86 if isequal(get(handles.XMin,'Visible'),'on') 104 XMin=str2num(get(handles.XMin,'String')); 105 if isempty(XMin) 106 % if ~isempty(YMin) 107 % if dimrange(2)>1 108 % % set(handles.XMin,'String',get(handles.YMin,'String')) 109 % data.RangeX(2)=YMin; 110 % XMin=YMin; 111 % end 112 % end 113 else 87 XMin=str2double(get(handles.XMin,'String')); 88 if ~isnan(XMin) 114 89 data.RangeX(2)=XMin; 115 %dimrange=[2 max(dimrange(2),1)];116 90 end 117 end 118 if isequal(get(handles.XMax,'Visible'),'on') 119 XMax=str2num(get(handles.XMax,'String')); 120 if isempty(XMax) 121 % if dimrange(1)>1 122 % % set(handles.XMax,'String',get(handles.XMin,'String')) 123 % if ~isempty(XMin) 124 % data.RangeX(2)=XMin; 125 % end 126 % elseif dimrange(2)>1 127 % % set(handles.XMax,'String',get(handles.YMax,'String')) 128 % data.RangeX(1)=YMax; 129 % end 130 else 91 end 92 if isequal(get(handles.XMax,'Visible'),'on') 93 XMax=str2double(get(handles.XMax,'String')); 94 if ~isnan(XMax) 131 95 data.RangeX(1)=XMax; 132 96 end 133 97 end 134 98 end
Note: See TracChangeset
for help on using the changeset viewer.