Changeset 1056
- Timestamp:
- Jul 18, 2018, 6:02:01 PM (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/series/extract_multitif_special.m
r1049 r1056 135 135 %% output directory 136 136 OutputDir=fullfile(Param.InputTable{1,1},[Param.OutputSubDir Param.OutputDirExt]); 137 137 OutputDirScan=fullfile(Param.InputTable{1,1},[Param.OutputSubDir Param.OutputDirExt]); 138 138 %% Timing 139 139 % XmlInputFile=Param.ActionInput.XmlFile; … … 144 144 % end 145 145 %ImagesPerLevel=size(XmlInput.Time,2)-1;%100;%use the xmlinformation to get the nbre of j indices 146 count0=14; 146 147 Dtj=0.05;% time interval between frames 147 ImagesPerLevel=45 0;% total number of images per position, ImagesPerLevel-Nbj images skiiped during motion between two positions148 Nbj= 400; %Nbre of images kept at a given position148 ImagesPerLevel=455;% total number of images per position, ImagesPerLevel-Nbj images skiiped during motion between two positions 149 Nbj=390; %Nbre of images kept at a given position 149 150 Dti=Dtj*ImagesPerLevel; 150 151 NbLevel=11; 151 152 NbScan=3; 152 TimeReturn=20; %time needed to return back to the first position (in sec) 153 NbSkippedReturn=round(TimeReturn/Dtj); 153 TimeReturn=268.5; %time needed to return back to the first position (in sec) 154 NbReturn=round(TimeReturn/Dtj); 155 NbSkipReturn=NbReturn+1-NbLevel*ImagesPerLevel; 154 156 %% create the xml file of PCO camera if it does not exist 155 157 Newxml=fullfile(Param.InputTable{1,1},[Param.InputTable{1,2} '.xml']); … … 164 166 XmlInput.Camera.BurstTiming.Dti=Dti; 165 167 XmlInput.Camera.BurstTiming.NbDti=NbLevel-1; 166 XmlInput.Camera.BurstTiming.Dtk=Dti*Nb 167 Level+TimeReturn; 168 XmlInput.Camera.BurstTiming.Dtk=TimeReturn; 168 169 XmlInput.Camera.BurstTiming.NbDtk=NbScan-1; 169 170 %XmlInput=rmfield(XmlInput,'Time'); … … 202 203 checkkeep=1; 203 204 count=count+1; 204 if count<=ImagesPerLevel*11 % first scan of 11 levels 205 i_index=fix((count-1)/ImagesPerLevel)+1; 206 j_index=mod(count-1,ImagesPerLevel)+1; 207 elseif count<=ImagesPerLevel*NbLevel+400 %skip 400 images during return 205 if count<count0 208 206 checkkeep=0; 209 elseif count<=ImagesPerLevel*2*NbLevel+400 % =5930 second scan 210 i_index=fix((count-401)/ImagesPerLevel)+1; 211 j_index=mod(count-401,ImagesPerLevel)+1; 212 elseif count<=ImagesPerLevel*2*NbLevel+800 %skip images during second return, from 2763 to 3167 213 checkkeep=0; 214 elseif count<=ImagesPerLevel*3*NbLevel+800 % =5930 third scan 215 i_index=fix((count-801)/ImagesPerLevel)+1; 216 j_index=mod(count-801,ImagesPerLevel)+1; 207 else 208 countnew=count-count0+1; 209 if countnew<=ImagesPerLevel*NbLevel % first scan of 11 levels 210 i_index=fix((countnew-1)/ImagesPerLevel)+1; 211 j_index=mod(countnew-1,ImagesPerLevel)+1; 212 elseif countnew<=NbReturn%skip 400 images during return 213 checkkeep=0; 214 elseif countnew<=NbReturn+ImagesPerLevel*NbLevel % =5930 second scan 215 i_index=fix((countnew-NbSkipReturn)/ImagesPerLevel)+1; 216 j_index=mod(countnew-NbSkipReturn,ImagesPerLevel)+1; 217 elseif countnew<=2*NbReturn %skip images during second return, from 2763 to 3167 218 checkkeep=0; 219 elseif countnew<=2*NbReturn+ImagesPerLevel*NbLevel % =5930 third scan 220 i_index=fix((countnew-2*NbSkipReturn)/ImagesPerLevel)+1; 221 j_index=mod(countnew-2*NbSkipReturn,ImagesPerLevel)+1; 222 end 217 223 end 218 224 if checkkeep … … 231 237 end 232 238 end 239 % else 240 % OutputFile=fullfile(OutputDir,['img_' num2str(i_index) '_' num2str(j_index) '.png']); 233 241 end 234 242 end
Note: See TracChangeset
for help on using the changeset viewer.