Changeset 1190


Ignore:
Timestamp:
Dec 18, 2025, 6:47:16 PM (2 months ago)
Author:
sommeria
Message:

file relabeling corrected for sub_background

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/series/sub_background.m

    r1180 r1190  
    246246
    247247%% File relabeling documented by the xml file
    248 CheckRelabel=isfield(Param,'FileSeries' );
     248CheckRelabel=isfield(Param.IndexRange,'Relabel' )&& Param.IndexRange.Relabel;%=true for index relabeling (PCO);
    249249
    250250%% Input file info
    251251if CheckRelabel
    252     [RootFileOut,frame_index]=index2filename(Param.FileSeries,Param.IndexRange.first_i,j_indices(1),NbField_j);
     252    XmlFileName=find_imadoc(RootPath,SubDir);
     253    if ~isempty(XmlFileName)
     254        XmlData=imadoc2struct(XmlFileName);%read the time from XmlFileName
     255    end
     256   % RootFileOut=index2filename(XmlData.FileSeries,1,1,MaxIndex_j);
     257    [RootFileOut,frame_index]=index2filename(XmlData.FileSeries,Param.IndexRange.first_i,j_indices(1),NbField_j);
    253258    FirstFileName=fullfile(RootPath,SubDir,RootFileOut);
    254259else
     
    315320        %filename=filecell{1,ifile};
    316321        if CheckRelabel
    317             [filename,FrameIndex]=index2filename(Param.FileSeries,i_indices(ifile),j_indices(ifile),NbField_j);
     322            [filename,FrameIndex]=index2filename(XmlData.FileSeries,i_indices(ifile),j_indices(ifile),NbField_j);
    318323             filename=fullfile(RootPath,SubDir,filename);
    319324        else
     
    340345        %write result file
    341346        if ~isequal(Param.ActionInput.SaturationValue,0)
    342             C=levels(Acor,Param.ActionInput.SaturationValue);
     347            he=levels(Acor,Param.ActionInput.SaturationValue);
    343348            imwrite(C,newname,'BitDepth',16); % save the new image
    344349        else
     
    370375                ifile=indselect(j_slice,ifield+iburst+step*halfnbaver);
    371376                if CheckRelabel
    372                     [filename,FrameIndex]=index2filename(Param.FileSeries,i_indices(ifile),j_indices(ifile),NbField_j);
     377                    [filename,FrameIndex]=index2filename(XmlData.FileSeries,i_indices(ifile),j_indices(ifile),NbField_j);
    373378                    filename=fullfile(RootPath,SubDir,filename);
    374379                else
Note: See TracChangeset for help on using the changeset viewer.