Changeset 60 for trunk/src/imadoc2struct.m
- Timestamp:
- Mar 23, 2010, 2:52:49 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/imadoc2struct.m
r29 r60 210 210 %look for laser plane definitions 211 211 uid_Angle=find(subt,'/GeometryCalib/PlaneAngle'); 212 uid_Pos=find(subt,'/GeometryCalib/PlanePos'); 212 uid_Pos=find(subt,'/GeometryCalib/SliceCoord'); 213 if isempty(uid_Pos) 214 uid_Pos=find(subt,'/GeometryCalib/PlanePos');%old convention 215 end 213 216 if ~isempty(uid_Angle) 214 217 tsai.PlaneAngle=str2num(get(subt,children(subt,uid_Angle),'value')); 215 218 end 216 if ~isempty(uid_Pos) 219 if ~isempty(uid_Pos) 217 220 for j=1:length(uid_Pos) 218 221 tsai.SliceCoord(j,:)=str2num(get(subt,children(subt,uid_Pos(j)),'value')); 219 222 end 223 uid_DZ=find(subt,'/GeometryCalib/SliceDZ'); 224 uid_NbSlice=find(subt,'/GeometryCalib/NbSlice'); 225 if ~isempty(uid_DZ) && ~isempty(uid_NbSlice) 226 DZ=str2double(get(subt,children(subt,uid_DZ),'value')); 227 NbSlice=get(subt,children(subt,uid_NbSlice),'value'); 228 if isequal(NbSlice,'volume') 229 tsai.NbSlice='volume'; 230 NbSlice=NbDtj+1; 231 else 232 tsai.NbSlice=str2double(NbSlice); 233 end 234 tsai.SliceCoord=ones(NbSlice,1)*tsai.SliceCoord+DZ*[0:NbSlice-1]'*[0 0 1]; 235 end 220 236 end 221 237 s.GeometryCalib=tsai;
Note: See TracChangeset
for help on using the changeset viewer.