Ignore:
Timestamp:
Jul 15, 2013, 2:50:47 PM (11 years ago)
Author:
sommeria
Message:

a few bugs corrected.
multimask introduced in merge_proj
displ_uvmat transformed into disp_uvmat

File:
1 edited

Legend:

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

    r661 r668  
    4545if isstruct(Param) && isequal(Param.Action.RUN,0)
    4646    Data=civ_input(Param);% introduce the civ parameters using the GUI civ_input
     47    if isempty(Data)
     48        Data=Param;% if  civ_input has been cancelled, keep previous parameters
     49    end
    4750    Data.Program=mfilename;%gives the name of the current function
    4851    Data.AllowInputSort='off';% allow alphabetic sorting of the list of input file SubDir (options 'off'/'on', 'off' by default)
     
    7477    checkrun=0;
    7578end
     79if ~isfield(Param,'ActionInput')
     80     disp_uvmat('ERROR','no parameter set for PIV',checkrun)
     81        return
     82end
    7683hseries=findobj(allchild(0),'Tag','series');
    7784RUNHandle=findobj(hseries,'Tag','RUN');%handle of RUN button in GUI series
     
    9097    [filecell,i_series,tild,j_series]=get_file_series(Param);
    9198    if ~exist(filecell{1,1},'file')
    92         displ_uvmat('ERROR',' the first input file does not exist')
     99        disp_uvmat('ERROR',' the first input file does not exist',checkrun)
    93100        return
    94101    else
     
    180187        [FileType_B,FileInfo,VideoObject_B]=get_file_type(filecell{2,1});
    181188        if ~ismember(FileType_B,{'image','multimage','mmreader','video'})
    182             displ_uvmat('ERROR',['the file line ' num2str(iview_B) ' must be an image'])
     189            disp_uvmat('ERROR',['the file line ' num2str(iview_B) ' must be an image'],checkrun)
    183190        end
    184191        i1_series_Civ1=i_series{1};i1_series_Civ2=i_series{1};
     
    453460        par_civ2.ImageB=[];
    454461        %         if ~isfield(Param.Civ1,'ImageA')
    455         ImageName_A_Civ2=fullfile_uvmat(RootPath,SubDir,RootFile,FileExt,NomType,i1_series_Civ2(ifield),[],j1_series_Civ2(ifield));
     462        ImageName_A_Civ2=fullfile_uvmat(RootPath_A,SubDir_A,RootFile_A,FileExt_A,NomType_A,i1_series_Civ2(ifield),[],j1_series_Civ2(ifield));
    456463
    457464        if strcmp(ImageName_A_Civ2,ImageName_A) && isequal(FrameIndex_A_Civ1(ifield),FrameIndex_A_Civ2(ifield))
     
    460467            [par_civ2.ImageA,VideoObject_A] = read_image(ImageName_A,FileType_A,VideoObject_A,FrameIndex_A_Civ2(ifield));
    461468        end
    462         ImageName_B_Civ2=fullfile_uvmat(RootPath,SubDir,RootFile,FileExt,NomType,i2_series_Civ2(ifield),[],j2_series_Civ2(ifield));
     469        ImageName_B_Civ2=fullfile_uvmat(RootPath_B,SubDir_B,RootFile_B,FileExt_B,NomType_B,i2_series_Civ2(ifield),[],j2_series_Civ2(ifield));
    463470        if strcmp(ImageName_B_Civ2,ImageName_B) && isequal(FrameIndex_B_Civ1(ifield),FrameIndex_B_Civ2)
    464471            par_civ2.ImageB=par_civ1.ImageB;
     
    467474        end     
    468475       
    469         ncfile=fullfile_uvmat(RootPath,OutputDir,RootFile,'.nc',NomTypeNc,i1_series_Civ2(ifield),i2_series_Civ2(ifield),...
     476        ncfile=fullfile_uvmat(RootPath_A,OutputDir,RootFile_A,'.nc',NomTypeNc,i1_series_Civ2(ifield),i2_series_Civ2(ifield),...
    470477            j1_series_Civ2(ifield),j2_series_Civ2(ifield));
    471478        par_civ2.ImageWidth=FileInfo_A.Width;
     
    9961003j1_series=ones(size(i_series));% set of first image numbers
    9971004j2_series=ones(size(i_series));
    998 check_bounds=false(size(i_series));
    9991005r=regexp(str_civ,'^\D(?<ind>[i|j])=( -| )(?<num1>\d+)\|(?<num2>\d+)','names');
    10001006if ~isempty(r)
     
    10031009    ind2=str2num(r.num2);
    10041010else
    1005     mode='burst';
     1011    mode='j1-j2';
    10061012    r=regexp(str_civ,'^j= (?<num1>[a-z])-(?<num2>[a-z])','names');
    10071013    if ~isempty(r)
     
    10421048    NomTypeNc='_1_1-2';
    10431049else  %bursts
    1044     j1_series=ind1*ones(size(i_series));
    1045     j2_series=ind2*ones(size(i_series));
    1046 end
    1047 
    1048 
    1049 
    1050 
     1050    i1_series=i_series(1,:);% do not sweep the j index
     1051    i2_series=i_series(1,:);
     1052    j1_series=ind1*ones(1,size(i_series,2));% j index is fixed by pair choice
     1053    j2_series=ind2*ones(1,size(i_series,2));
     1054    check_bounds=zeros(size(i1_series));% no limitations due to min-max indices
     1055end
     1056
     1057
     1058
     1059
Note: See TracChangeset for help on using the changeset viewer.