Changeset 675 for trunk/src/read_multimadoc.m
- Timestamp:
- Aug 27, 2013, 11:25:21 PM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/read_multimadoc.m
r620 r675 7 7 % NbSlice_calib: nbre of slices detected in the geometric calibration data 8 8 % Time(iview,i,j): matrix of times, iview =index of the series, i,j=file indices within the series 9 % if the time is not consistent in all series, the time from the first series is chosen 9 10 % warnmsg: warning message, ='' if OK 10 11 % … … 59 60 60 61 function time=get_time(timeimadoc,i1_series,i2_series,j1_series,j2_series) 61 if isempty(i2_series)||size(timeimadoc,1) < i2_series(end) ||( ~isempty(j2_series) && size(timeimadoc,2) < j2_series(end))% time array absent or too short in ImaDoc xml file' 62 time=[]; 63 else 64 timevect=timeimadoc'; 65 if ~isempty(j1_series) 66 vect_index=reshape(j1_series+(i1_series-1)*size(timevect,1),1,[]); 67 time=timevect(vect_index); 68 if ~isempty(j2_series) 69 vect_index=reshape(j2_series+(i1_series-1)*size(timevect,1),1,[]); 70 time=(time+timevect(vect_index))/2; 71 end 72 else 73 time=timevect(i1_series); 74 if ~isempty(i2_series) 75 time=(time+timevect(i2_series))/2; 76 end 77 end 78 end 62 time=[]; 63 if ~ (isempty(i2_series)||size(timeimadoc,1) < i2_series(end) ||( ~isempty(j2_series) && size(timeimadoc,2) < j2_series(end)))% time array absent or too short in ImaDoc xml file' 64 if isempty(j1_series) 65 j1_series=1; 66 end 67 time=timeimadoc(i1_series+1,j1_series+1); 68 if ~isempty(j2_series) 69 time=[time timeimadoc(i1_series+1,j2_series+1)]; 70 end 71 if ~isempty(i2_series) 72 time=[time timeimadoc(i2_series+1,j1_series+1)]; 73 if ~isempty(j2_series) 74 time=[time timeimadoc(i2_series+1,j2_series+1)]; 75 end 76 end 77 time=mean(time); 78 end
Note: See TracChangeset
for help on using the changeset viewer.