Changeset 1203
- Timestamp:
- Mar 24, 2026, 5:38:30 PM (2 days ago)
- Location:
- trunk/src
- Files:
-
- 1 added
- 2 edited
-
series.m (modified) (1 diff)
-
series/civ_series.m (modified) (2 diffs)
-
series/usr_fct/check_field_series.m (added)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/series.m
r1202 r1203 756 756 XmlData=[]; 757 757 if ~isempty(XmlFileName) 758 XmlData=read_imadoc t(XmlFileName);%read the imadoc file through the local fct read_imadoc758 XmlData=read_imadoc(XmlFileName);%read the imadoc file through the local fct read_imadoc 759 759 if isfield(XmlData,'FileSeries') && Rank==0 760 760 set(handles.Relabel,'Visible','on') -
trunk/src/series/civ_series.m
r1202 r1203 390 390 [par_civ1.ImageB,VideoObject_B] = read_image(ImageName_B,FileType_B,VideoObject_B,FrameIndex_B); 391 391 392 393 % case of background image to subtract394 if par_civ1.CheckBackground &&~isempty(par_civ1.Background)395 [RootPath_background,SubDir_background,RootFile_background,~,~,~,~,Ext_background]=fileparts_uvmat(Param.ActionInput.Civ1.Background);396 if strcmp(NomTypeNc,'_1-2_1')% case of volume,backgrounds act on different j levels397 backgroundname=fullfile_uvmat(RootPath_background,SubDir_background,RootFile_background,Ext_background,'_1',j1_series_Civ1(ifield));398 elseif isfield(par_civ1,'NbSlice')399 i1_background=mod(i1-1,par_civ1.NbSlice)+1;400 backgroundname=fullfile_uvmat(RootPath_background,SubDir_background,RootFile_background,Ext_background,'_1',i1_background);401 if strcmp(Param.ActionInput.PairIndices.ListPairMode,'series(Di)')% case of volume, background index refers to j index402 par_civ1.NbSlice_j=par_civ1.NbSlice;403 end404 else405 backgroundname=Param.ActionInput.Civ1.Background;406 end407 if strcmp(backgroundoldname,backgroundname)% background exist, not already read in civ1408 par_civ1.Background=background; %use background already opened409 else410 if ~isempty(regexp(backgroundname,'(^http://)|(^https://)', 'once'))|| exist(backgroundname,'file')411 try412 par_civ1.Background=uint16(imread(backgroundname));%update the background, an store it for future use413 catch ME414 if ~isempty(ME.message)415 errormsg=['error reading input image: ' ME.message];416 disp_uvmat('ERROR',errormsg,checkrun)417 return418 end419 end420 else421 par_civ1.Background=[];422 end423 background=par_civ1.Background;424 backgroundoldname=backgroundname;425 end426 par_civ1.ImageA=uint16(par_civ1.ImageA)-par_civ1.Background;427 par_civ1.ImageB=uint16(par_civ1.ImageB)-par_civ1.Background;428 end429 430 % case of image luminosity rescaling431 if par_civ1.CheckRescale &&~isempty(par_civ1.Maxtanh)432 par_civ1.ImageA =par_civ1.Maxtanh*tanh(double(par_civ1.ImageA)/par_civ1.Maxtanh);433 par_civ1.ImageB=par_civ1.Maxtanh*tanh(double(par_civ1.ImageB)/par_civ1.Maxtanh);434 end435 436 392 % par_civ1.ImageWidth=size(par_civ1.ImageA,2); 437 393 % par_civ1.ImageHeight=size(par_civ1.ImageA,1); … … 467 423 Data.ListGlobalAttribute=[ListGlobalAttribute Civ1_param]; 468 424 Data.CivStage=1; 425 426 427 428 % case of background image to subtract 429 if par_civ1.CheckBackground &&~isempty(par_civ1.Background) 430 [RootPath_background,SubDir_background,RootFile_background,~,~,~,~,Ext_background]=fileparts_uvmat(Param.ActionInput.Civ1.Background); 431 if strcmp(NomTypeNc,'_1-2_1')% case of volume,backgrounds act on different j levels 432 backgroundname=fullfile_uvmat(RootPath_background,SubDir_background,RootFile_background,Ext_background,'_1',j1_series_Civ1(ifield)); 433 elseif isfield(par_civ1,'NbSlice') 434 i1_background=mod(i1-1,par_civ1.NbSlice)+1; 435 backgroundname=fullfile_uvmat(RootPath_background,SubDir_background,RootFile_background,Ext_background,'_1',i1_background); 436 if strcmp(Param.ActionInput.PairIndices.ListPairMode,'series(Di)')% case of volume, background index refers to j index 437 par_civ1.NbSlice_j=par_civ1.NbSlice; 438 end 439 else 440 backgroundname=Param.ActionInput.Civ1.Background; 441 end 442 if strcmp(backgroundoldname,backgroundname)% background exist, not already read in civ1 443 par_civ1.Background=background; %use background already opened 444 else 445 if ~isempty(regexp(backgroundname,'(^http://)|(^https://)', 'once'))|| exist(backgroundname,'file') 446 try 447 par_civ1.Background=uint16(imread(backgroundname));%update the background, an store it for future use 448 catch ME 449 if ~isempty(ME.message) 450 errormsg=['error reading input image: ' ME.message]; 451 disp_uvmat('ERROR',errormsg,checkrun) 452 return 453 end 454 end 455 else 456 par_civ1.Background=[]; 457 end 458 background=par_civ1.Background; 459 backgroundoldname=backgroundname; 460 end 461 par_civ1.ImageA=uint16(par_civ1.ImageA)-par_civ1.Background; 462 par_civ1.ImageB=uint16(par_civ1.ImageB)-par_civ1.Background; 463 end 464 465 % case of image luminosity rescaling 466 if par_civ1.CheckRescale &&~isempty(par_civ1.Maxtanh) 467 par_civ1.ImageA =par_civ1.Maxtanh*tanh(double(par_civ1.ImageA)/par_civ1.Maxtanh); 468 par_civ1.ImageB=par_civ1.Maxtanh*tanh(double(par_civ1.ImageB)/par_civ1.Maxtanh); 469 end 470 471 469 472 470 473 % set the list of variables
Note: See TracChangeset
for help on using the changeset viewer.
