Changeset 1183


Ignore:
Timestamp:
Nov 3, 2025, 2:54:33 PM (5 weeks ago)
Author:
sommeria
Message:

bed_scan added + bug repairs

Location:
trunk/src
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/imadoc2struct.m

    r1178 r1183  
    4141[tild,tild,FileExt]=fileparts(ImaDoc);
    4242
    43 if nargin ==1
     43if nargin ==1% no additional input variable beyond 'ImaDoc'
    4444    [s,Heading,errormsg]=xml2struct(ImaDoc);% convert the whole xml file in a structure s
    45 elseif nargin ==2
     45elseif nargin ==2 %one additional input variable beyond 'ImaDoc'specifying the subtree to read
    4646    [s,Heading,errormsg]=xml2struct(ImaDoc,varargin{1});% convert the xml file in a structure s, keeping only the subtree defined in input
    47 else %TODO: deal with more than two subtrees?
     47else % case of two subtrees, TODO: deal with more than two subtrees?
    4848    [s,Heading,errormsg]=xml2struct(ImaDoc,varargin{1},varargin{2});% convert the xml file in a structure s, keeping only the subtree defined in input
    4949end
  • trunk/src/keyboard_callback.m

    r1154 r1183  
    2525if ~isempty(xx)
    2626    switch xx
    27         case {29,28,30,31}    %arrows for displacement
     27        case {29,28,30,31,8592,8593,8594,8595}  %arrows for displacement (linux or windows)
    2828            hhh=get(hObject,'CurrentObject');
    2929            AxeData=get(cur_axes,'UserData');
     
    3737                dx=(xlimit(2)-xlimit(1))/10;
    3838                dy=(ylimit(2)-ylimit(1))/10;
    39                 if isequal(xx,29)%move arrow right
    40                     xlimit=xlimit+dx;
    41                 elseif isequal(xx,28)%move arrow left
    42                     xlimit=xlimit-dx;
    43                 elseif isequal(xx,30)%move arrow up
    44                     ylimit=ylimit+dy;
    45                 elseif isequal(xx,31)%move arrow down
    46                     ylimit=ylimit-dy;
     39                switch xx
     40                    case{29,8594}%move arrow right
     41                        xlimit=xlimit+dx;
     42                    case{28,8592}%move arrow left
     43                        xlimit=xlimit-dx;
     44                    case {30,8593}%move arrow up
     45                        ylimit=ylimit+dy;
     46                    case{31,8595}%move arrow down%move arrow down
     47                        ylimit=ylimit-dy;
    4748                end
    4849                set(cur_axes,'XLim',xlimit)
  • trunk/src/series.m

    r1182 r1183  
    34223422%% use a browser to choose the xml file containing the processing config
    34233423InputTable=get(handles.InputTable,'Data');
     3424oldfile='';
     3425if isempty(InputTable)
     3426    oldfile='';
     3427else
    34243428oldfile=InputTable{1,1}; % current path in InputTable
     3429end
    34253430if isempty(oldfile)
    34263431    % use a file name stored in prefdir
  • trunk/src/series/bed_scan.m

    r1182 r1183  
    196196tic
    197197nb_scan=10;
    198 nb_scan=10;
    199198for img=1:nb_scan
    200199     img
  • trunk/src/series/civ_series.m

    r1181 r1183  
    503503                j1=j1_series_Civ1(ifield);
    504504            end
    505             if ~isempty(i2_series_Civ1)% case of volume,masks act on different j levels
     505            if ~isempty(i2_series_Civ1)&& ~isequal(i1_series_Civ1,i2_series_Civ1)% case of volume,masks act on different j levels
    506506                maskname=fullfile_uvmat(RootPath_mask,SubDir_mask,RootFile_mask,Ext_mask,'_1',j1);
    507507            elseif isfield(par_civ1,'NbSlice')
     
    766766        if par_civ2.CheckMask && ~isempty(par_civ2.Mask)
    767767            [RootPath_mask,SubDir_mask,RootFile_mask,~,~,~,~,Ext_mask]=fileparts_uvmat(Param.ActionInput.Civ2.Mask);
    768             if ~isempty(i2_series_Civ2) % we do PIV among indices i,  at given indices j (volume scan), mask depends on position j
     768            if ~isempty(i2_series_Civ2) && ~isequal(i1_series_Civ2,i2_series_Civ2) % we do PIV among indices i,  at given indices j (volume scan), mask depends on position j
    769769                j1=1;
    770770                if ~isempty(j1_series_Civ2)
  • trunk/src/uvmat.m

    r1182 r1183  
    1313
    1414%=======================================================================
    15 % Copyright 2008-2024, LEGI UMR 5519 / CNRS UGA G-INP, Grenoble, ileSeriesrance
     15% Copyright 2008-2024, LEGI UMR 5519 / CNRS UGA G-INP, Grenoble, France
    1616%   http://www.legi.grenoble-inp.fr
    1717%   Joel.Sommeria - Joel.Sommeria (A) univ-grenoble-alpes.fr
     
    536536function MenuExportFigure_Callback(hObject, eventdata, handles)
    537537%------------------------------------------------------------------------
    538 hfig=figure;
    539 hc=copyobj(handles.PlotAxes,hfig);
    540 set(hc,'Position',[0.1 0.1 0.8 0.8])
     538hfig=figure;%create a new figure
     539hc=copyobj(handles.PlotAxes,hfig);%copy the current axis content on the new fig
     540set(hc,'Position',[0.1 0.1 0.8 0.8])% adjust the position of the axis on the figure
    541541title_menu=get(handles.FieldName,'String');
    542 title_string=title_menu{get(handles.FieldName,'Value')};
     542title_string=title_menu{get(handles.FieldName,'Value')};% get the name of the plotted field
    543543title(title_string);
     544set(hc,'FontSize',16); %set the sdize of titles and labels
     545
     546%% copy the colormap to the new fig if relevant
    544547h=findobj(handles.PlotAxes,'tag','ima'); %look for image in the plot
    545 if ~isempty(h)
     548if ~isempty(h)% copy the colorbar to the new fig if relevant
    546549    map=colormap(handles.PlotAxes);
    547550    colormap(map);%transmit the current colormap to the new fig
     
    28782881else
    28792882    index_string=get(handles.FileIndex,'String');
    2880     if isfield(UvData,'XmlData')&& isfield(UvData.XmlData{1},'FileSeries')% The frame indexing is determined through the xml file, section FileSeries
     2883    if isfield(UvData,'XmlData')&& isfield(UvData.XmlData{1},'FileSeries')
    28812884        i1=str2double(get(handles.i1,'String'));
    28822885        j1=str2double(get(handles.j1,'String'));
    28832886        NbField_j_cell=get(handles.MaxIndex_j,'String');
    28842887        NbField_j=str2double(NbField_j_cell{1});
    2885         [RootFile,index_string,FrameIndex]=index2filename(UvData.XmlData{1}.FileSeries,i1,j1,NbField_j);% convert frame index i1 j1 to index in the files
     2888        [RootFile,index_string,FrameIndex]=index2filename(UvData.XmlData{1}.FileSeries,i1,j1,NbField_j);
    28862889        set(handles.RootFile,'String',RootFile)
    28872890    else
  • trunk/src/xml2struct.m

    r1150 r1183  
    3939catch ME
    4040    errormsg=ME.message;
    41     if ~isempty(regexp(ME.message,'Undefined function'))||~isempty(regexp(ME.message,'Missing'))
     41    if ~isempty(regexp(ME.message,'Undefined function','once'))||~isempty(regexp(ME.message,'Missing','once'))
    4242        errormsg=[errormsg ': package xmltree not correctly installed, reload it from www.artefact.tk/software/matlab/xml'];
    4343    end
     
    5252    end
    5353end
    54 if nargin>1
     54if nargin>1 % additional input vartiable(s) beyond filename, select specified subtrees
    5555    for isub=1:nargin-1
    5656        uid_sub=find(t,['/' RootTag '/' varargin{isub}]);
     
    5858            s.(varargin{isub})=[];
    5959        else
    60         tsub=branch(t,uid_sub);
    61         if ~isempty(get(tsub,1,'contents'))
    62         ss=convert(tsub);
    63         s.(varargin{isub})=convert_string(ss);
    64         end
     60            tsub=branch(t,uid_sub);
     61            if ~isempty(get(tsub,1,'contents'))
     62                ss=convert(tsub);
     63                s.(varargin{isub})=convert_string(ss);
     64            end
    6565        end
    6666    end
    6767else
    6868    try
    69     ss=convert(t);%transform the xmltree object into a Matlab structure.
    70     s=convert_string(ss);
     69        ss=convert(t);%transform the xmltree object into a Matlab structure.
     70        s=convert_string(ss);% explore the sub-structures if needed
    7171    catch ME
    7272        errormsg=ME.message;
     
    8686    case 'char'
    8787        % try to convert to number if the char does not correspond to a function (otherwise str2num calls this function as it uses 'eval')
    88 %         if exist(ss,'builtin')||exist(ss,'file')% ss corresponds to the name of a builtin Matlab function or a file
    89 %             out=ss; %reproduce the input string
    90 %         else
     88        if exist(ss,'builtin')||exist(ss,'file')% ss corresponds to the name of a builtin Matlab function or a file
     89            out=ss; %reproduce the input string
     90        else
    9191            out=str2num(ss);% convert to number or vector (str2num applied to a fct name executes this fct by 'eval', thus this possibility had to be ruled out above
    9292            if isempty(out)
     
    102102                end
    103103            end
    104 %         end
     104         end
    105105    case 'cell'
    106106        out={};%default
Note: See TracChangeset for help on using the changeset viewer.