Changeset 609 for trunk/src/series/civ_series.m
- Timestamp:
- Apr 9, 2013, 8:20:00 PM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/series/civ_series.m
r606 r609 58 58 if ~exist(filecell{1,1},'file') 59 59 msgbox_uvmat('WARNING','the first input file does not exist') 60 else 61 FileType=get_file_type(filecell{1,1}); 62 if isempty(find(strcmp(FileType,{'civdata','image','multimage','mmreader','video'})));% =1 for images 63 msgbox_uvmat('ERROR',['bad input file type for ' mfilename ': an image or civdata file is needed']) 64 end 60 65 end 61 66 return … … 85 90 MinIndex=cell2mat(Param.IndexRange.MinIndex); 86 91 [filecell,i_series,tild,j_series]=get_file_series(Param); 92 [FileType_A,FileInfo,MovieObject_A]=get_file_type(filecell{1,1}); 93 if strcmp(FileType_A,'civdata')% a civdata file has been introduced as input. 94 [FileType_A,FileInfo,MovieObject_A]=get_file_type(filecell{2,1}); 95 end 87 96 [i1_series_Civ1,i2_series_Civ1,j1_series_Civ1,j2_series_Civ1,check_bounds,NomTypeNc]=... 88 97 find_pair_indices(PairCiv1,i_series{1},j_series{1},MinIndex,MaxIndex); … … 118 127 119 128 NbField=numel(i1_series_Civ1); 120 [FileType_A,FileInfo,MovieObject_A]=get_file_type(filecell{1,1}); 129 121 130 FileType_B=FileType_A; 122 131 MovieObject_B=MovieObject_A; … … 143 152 144 153 %% get timing from the ImaDoc file or input video 145 [XmlData,NbSlice_calib,time,errormsg]=read_multimadoc(RootPath,SubDir,RootFile,FileExt,i1_series,i2_series,j1_series,j2_series); 154 XmlFileName=find_imadoc(RootPath,SubDir,RootFile,FileExt); 155 time=[]; 156 if ~isempty(XmlFileName) 157 XmlData=imadoc2struct(XmlFileName); 158 if isfield(XmlData,'Time') 159 time=XmlData.Time; 160 TimeSource='xml'; 161 end 162 if isfield(XmlData,'Camera') 163 if isfield(XmlData.Camera,'NbSlice')&& ~isempty(XmlData.Camera.NbSlice) 164 NbSlice_calib{iview}=XmlData.Camera.NbSlice;% Nbre of slices for Zindex in phys transform 165 if ~isequal(NbSlice_calib{iview},NbSlice_calib{1}) 166 msgbox_uvmat('WARNING','inconsistent number of Z indices for the two field series'); 167 end 168 end 169 if isfield(XmlData.Camera,'TimeUnit')&& ~isempty(XmlData.Camera.TimeUnit) 170 TimeUnit=XmlData.Camera.TimeUnit; 171 end 172 end 173 end 174 if strcmp(InputTable{iview,4},'*') 175 if ~isempty(VideoObject) 176 imainfo=get(VideoObject); 177 time=zeros(imainfo.NumberOfFrames+1,2); 178 time(:,2)=(0:1/imainfo.FrameRate:(imainfo.NumberOfFrames)/imainfo.FrameRate)'; 179 TimeSource='video'; 180 % set(han:dles.Dt_txt,'String',['Dt=' num2str(1000/imainfo.FrameRate) 'ms']);%display the elementary time interval in millisec 181 ColorType='truecolor'; 182 elseif ~isempty(imformats(regexprep(InputTable{iview,5},'^.',''))) || isequal(InputTable{iview,5},'.vol')%&& isequal(NomType,'*')% multi-frame image 183 if ~isempty(InputTable{iview,2}) 184 imainfo=imfinfo(fullfile(InputTable{iview,1},InputTable{iview,2},[InputTable{iview,3} InputTable{iview,5}])); 185 else 186 imainfo=imfinfo([FileBase InputTable{iview,5}]); 187 end 188 ColorType=imainfo.ColorType;%='truecolor' for color images 189 if length(imainfo) >1 %case of image with multiple frames 190 nbfield=length(imainfo); 191 nbfield_j=1; 192 end 193 end 194 end 195 146 196 %TODO: get time_A and time_B 147 % case of movies TODO TODO TODO 197 148 198 if isempty(time) && (strcmp(FileType,'video') || strcmp(FileType,'mmreader')) 149 199 set(handles.ListPairMode,'Value',1); … … 161 211 end 162 212 TimeUnit='s'; 213 end 163 214 %%%%% MAIN LOOP %%%%%% 164 215
Note: See TracChangeset
for help on using the changeset viewer.