Ignore:
Timestamp:
Mar 11, 2025, 9:51:39 PM (3 days ago)
Author:
sommeria
Message:

add loglin histogram in uvmat and image rescale in civ_series

File:
1 edited

Legend:

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

    r1170 r1175  
    5151%% set the input elements needed on the GUI series when the action is selected in the menu ActionName or InputTable refreshed
    5252if isstruct(Param) && isequal(Param.Action.RUN,0)% function activated from the GUI series but not RUN
     53    if 0==1 %never satisfied but trigger compilation with the appropriate transform functions ('eval' inactive for compilation)
     54        ima_rescale
     55    end
    5356    path_series=fileparts(which('series'));
    5457    addpath(fullfile(path_series,'series'))
     
    6669    Data.VelType='off';% menu for selecting the velocity type (options 'off'/'one'/'two',  'off' by default)
    6770    Data.FieldName='on';% menu for selecting the field (s) in the input file(options 'off'/'one'/'two', 'off' by default)
    68     Data.FieldTransform = 'off';%can use a transform function
     71    Data.FieldTransform = 'on';%can use a transform function
    6972    Data.ProjObject='off';%can use projection object(option 'off'/'on',
    7073    Data.Mask='off';%can use mask option   (option 'off'/'on', 'off' by default)
     
    99102% CheckOutputFile=isfield(Param,'OutputSubDir');%= 1 in test use for TestPatch (no nc file produced)
    100103
    101 %% input files and indexing (skipped in Test mode)
     104%% input files and indexing
    102105hseries=findobj(allchild(0),'Tag','series');
    103106RUNHandle=findobj(hseries,'Tag','RUN');%handle of RUN button in GUI series
     
    112115if isfield(Param,'InputTable')
    113116    [filecell,i1_series,i2_series,j1_series,j2_series]=get_file_series(Param);
    114     %         iview_A=0;% series index (iview) for the first image series
    115117    iview_B=0;% series index (iview) for the second image series (only non zero for option 'shift' comparing two image series )
    116118    if Param.ActionInput.CheckCiv1
     
    119121        iview_A=2;% the second line is used for the input images
    120122    end
    121     %         if iview_A~=0
    122123    RootPath_A=Param.InputTable{iview_A,1};
    123124    RootFile_A=Param.InputTable{iview_A,3};
     
    253254    end
    254255end
    255 % end
     256
     257%% introduce input image transform
     258if isfield(Param,'FieldTransform')&&~isempty(Param.FieldTransform.TransformName)
     259        addpath(Param.FieldTransform.TransformPath)
     260    transform_fct=str2func(Param.FieldTransform.TransformName);
     261    rmpath(Param.FieldTransform.TransformPath)
     262end
     263
    256264
    257265%%%%% MAIN LOOP %%%%%%
     
    276284        end
    277285    end
    278     %     %     if CheckInputFile
    279     %     if CheckOutputFile
    280286    OutputPath=fullfile(Param.OutputPath,Param.Experiment,Param.Device);
    281     %         if iview_A==0 % no nc file has been entered
    282     %             ncfile=fullfile_uvmat(OutputPath,Param.InputTable{1,2},Param.InputTable{1,3},Param.InputTable{1,5},...
    283     %                 NomTypeNc,i1_series_Civ1(ifield),i2_series_Civ1(ifield),j1_series_Civ1(ifield),j2_series_Civ1(ifield));
    284     %         else% an existing nc file has been entered
    285     %             if iview_A==1% if Civ1 is performed
    286     %                 Civ1Dir=OutputDir;
    287     %             else
    288     %                 Civ1Dir=Param.InputTable{1,2};
    289     %             end
     287
    290288    if strcmp(Param.ActionInput.ListCompareMode,'PIV')
    291289        ncfile=fullfile_uvmat(OutputPath,OutputDir,RootFile_A,'.nc',NomTypeNc,i1_series_Civ1(ifield),i2_series_Civ1(ifield),...
     
    295293            j1_series_Civ1(ifield),j2_series_Civ1(ifield));
    296294    end
    297     %         end
    298295    ncfile_out=ncfile;% by default
    299296   
     
    380377            end
    381378            [par_civ1.ImageB,VideoObject_B] = read_image(ImageName_B,FileType_B,VideoObject_B,FrameIndex_B_Civ1(ifield));
     379           
    382380        catch ME % display errors in reading input images
    383381            if ~isempty(ME.message)
     
    385383                continue
    386384            end
     385        end
     386        %% user defined image transform
     387        if ~isempty(transform_fct)
     388               par_civ1 =transform_fct(par_civ1,Param);
    387389        end
    388390       
     
    597599            par_civ2.Grid(:,2)=reshape(GridY,[],1);% increases with array index
    598600        end
     601       
     602                %% user defined image transform
     603        if ~isempty(transform_fct)
     604               par_civ2 =transform_fct(par_civ2,Param);
     605        end
     606       
    599607       
    600608        % get the guess from patch1 or patch2 (case 'CheckCiv3')
Note: See TracChangeset for help on using the changeset viewer.