Changeset 599 for trunk/src/series/sub_background.m
- Timestamp:
- Apr 3, 2013, 10:21:53 AM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/series/sub_background.m
r596 r599 171 171 nbaver_ima=nbaver*step; 172 172 end 173 ParamOut. InputGUI.CheckVolume=strcmp(answer{1},'Yes');174 ParamOut. InputGUI.SlidingSequenceLength=nbaver_ima;175 ParamOut. InputGUI.BrightnessRankThreshold=str2num(answer{3});173 ParamOut.ActionInput.CheckVolume=strcmp(answer{1},'Yes'); 174 ParamOut.ActionInput.SlidingSequenceLength=nbaver_ima; 175 ParamOut.ActionInput.BrightnessRankThreshold=str2num(answer{3}); 176 176 177 177 % apply the image rescaling function 'level' (avoid the blinking effects of bright particles) 178 178 answer=msgbox_uvmat('INPUT_Y-N','apply image rescaling function levels.m after sub_background'); 179 ParamOut. InputGUI.CheckLevelTransform=strcmp(answer,'Yes');179 ParamOut.ActionInput.CheckLevelTransform=strcmp(answer,'Yes'); 180 180 return 181 181 end … … 190 190 191 191 %% Input preparation 192 nbaver_ima=Param. InputGUI.SlidingSequenceLength;192 nbaver_ima=Param.ActionInput.SlidingSequenceLength; 193 193 NbSlice=Param.IndexRange.NbSlice; 194 194 if ~isequal(NbSlice,1) … … 225 225 OutputDir=[Param.OutputSubDir Param.OutputDirExt]; 226 226 227 if isequal(Param. InputGUI.CheckVolume,1)227 if isequal(Param.ActionInput.CheckVolume,1) 228 228 step=1; 229 229 else 230 230 step=nbfield_j;%case of bursts: the sliding background is shifted by the length of one burst 231 231 end 232 nbaver_ima=Param. InputGUI.SlidingSequenceLength;%number of images for the sliding background232 nbaver_ima=Param.ActionInput.SlidingSequenceLength;%number of images for the sliding background 233 233 nbaver=ceil(nbaver_ima/step);%number of bursts for the sliding background 234 234 if isequal(floor(nbaver/2),nbaver) … … 242 242 243 243 % calculate absolute brightness rank 244 rank=floor(Param. InputGUI.BrightnessRankThreshold*nbaver_ima);244 rank=floor(Param.ActionInput.BrightnessRankThreshold*nbaver_ima); 245 245 if rank==0 246 246 rank=1;%rank selected in the sorted image series … … 346 346 347 347 %write result file 348 if Param. InputGUI.CheckLevelTransform348 if Param.ActionInput.CheckLevelTransform 349 349 C=levels(Acor); 350 350 imwrite(C,newname,'BitDepth',8); % save the new image … … 395 395 newname=fullfile_uvmat(RootPath{1},OutputDir,RootFile{1},FileExtOut,NomTypeOut,i1_series{1}(ifile),[],j1); 396 396 %write result file 397 if Param. InputGUI.CheckLevelTransform397 if Param.ActionInput.CheckLevelTransform 398 398 C=levels(Acor); 399 399 imwrite(C,newname,'BitDepth',8); % save the new image … … 430 430 431 431 %write result file 432 if Param. InputGUI.CheckLevelTransform432 if Param.ActionInput.CheckLevelTransform 433 433 C=levels(Acor); 434 434 imwrite(C,newname,'BitDepth',8); % save the new image
Note: See TracChangeset
for help on using the changeset viewer.