Changeset 1183
- Timestamp:
- Nov 3, 2025, 2:54:33 PM (5 weeks ago)
- Location:
- trunk/src
- Files:
-
- 7 edited
-
imadoc2struct.m (modified) (1 diff)
-
keyboard_callback.m (modified) (2 diffs)
-
series.m (modified) (1 diff)
-
series/bed_scan.m (modified) (1 diff)
-
series/civ_series.m (modified) (2 diffs)
-
uvmat.m (modified) (3 diffs)
-
xml2struct.m (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/imadoc2struct.m
r1178 r1183 41 41 [tild,tild,FileExt]=fileparts(ImaDoc); 42 42 43 if nargin ==1 43 if nargin ==1% no additional input variable beyond 'ImaDoc' 44 44 [s,Heading,errormsg]=xml2struct(ImaDoc);% convert the whole xml file in a structure s 45 elseif nargin ==2 45 elseif nargin ==2 %one additional input variable beyond 'ImaDoc'specifying the subtree to read 46 46 [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?47 else % case of two subtrees, TODO: deal with more than two subtrees? 48 48 [s,Heading,errormsg]=xml2struct(ImaDoc,varargin{1},varargin{2});% convert the xml file in a structure s, keeping only the subtree defined in input 49 49 end -
trunk/src/keyboard_callback.m
r1154 r1183 25 25 if ~isempty(xx) 26 26 switch xx 27 case {29,28,30,31 } %arrows for displacement27 case {29,28,30,31,8592,8593,8594,8595} %arrows for displacement (linux or windows) 28 28 hhh=get(hObject,'CurrentObject'); 29 29 AxeData=get(cur_axes,'UserData'); … … 37 37 dx=(xlimit(2)-xlimit(1))/10; 38 38 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; 47 48 end 48 49 set(cur_axes,'XLim',xlimit) -
trunk/src/series.m
r1182 r1183 3422 3422 %% use a browser to choose the xml file containing the processing config 3423 3423 InputTable=get(handles.InputTable,'Data'); 3424 oldfile=''; 3425 if isempty(InputTable) 3426 oldfile=''; 3427 else 3424 3428 oldfile=InputTable{1,1}; % current path in InputTable 3429 end 3425 3430 if isempty(oldfile) 3426 3431 % use a file name stored in prefdir -
trunk/src/series/bed_scan.m
r1182 r1183 196 196 tic 197 197 nb_scan=10; 198 nb_scan=10;199 198 for img=1:nb_scan 200 199 img -
trunk/src/series/civ_series.m
r1181 r1183 503 503 j1=j1_series_Civ1(ifield); 504 504 end 505 if ~isempty(i2_series_Civ1) % case of volume,masks act on different j levels505 if ~isempty(i2_series_Civ1)&& ~isequal(i1_series_Civ1,i2_series_Civ1)% case of volume,masks act on different j levels 506 506 maskname=fullfile_uvmat(RootPath_mask,SubDir_mask,RootFile_mask,Ext_mask,'_1',j1); 507 507 elseif isfield(par_civ1,'NbSlice') … … 766 766 if par_civ2.CheckMask && ~isempty(par_civ2.Mask) 767 767 [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 j768 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 769 769 j1=1; 770 770 if ~isempty(j1_series_Civ2) -
trunk/src/uvmat.m
r1182 r1183 13 13 14 14 %======================================================================= 15 % Copyright 2008-2024, LEGI UMR 5519 / CNRS UGA G-INP, Grenoble, ileSeriesrance15 % Copyright 2008-2024, LEGI UMR 5519 / CNRS UGA G-INP, Grenoble, France 16 16 % http://www.legi.grenoble-inp.fr 17 17 % Joel.Sommeria - Joel.Sommeria (A) univ-grenoble-alpes.fr … … 536 536 function MenuExportFigure_Callback(hObject, eventdata, handles) 537 537 %------------------------------------------------------------------------ 538 hfig=figure; 539 hc=copyobj(handles.PlotAxes,hfig); 540 set(hc,'Position',[0.1 0.1 0.8 0.8]) 538 hfig=figure;%create a new figure 539 hc=copyobj(handles.PlotAxes,hfig);%copy the current axis content on the new fig 540 set(hc,'Position',[0.1 0.1 0.8 0.8])% adjust the position of the axis on the figure 541 541 title_menu=get(handles.FieldName,'String'); 542 title_string=title_menu{get(handles.FieldName,'Value')}; 542 title_string=title_menu{get(handles.FieldName,'Value')};% get the name of the plotted field 543 543 title(title_string); 544 set(hc,'FontSize',16); %set the sdize of titles and labels 545 546 %% copy the colormap to the new fig if relevant 544 547 h=findobj(handles.PlotAxes,'tag','ima'); %look for image in the plot 545 if ~isempty(h) 548 if ~isempty(h)% copy the colorbar to the new fig if relevant 546 549 map=colormap(handles.PlotAxes); 547 550 colormap(map);%transmit the current colormap to the new fig … … 2878 2881 else 2879 2882 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 FileSeries2883 if isfield(UvData,'XmlData')&& isfield(UvData.XmlData{1},'FileSeries') 2881 2884 i1=str2double(get(handles.i1,'String')); 2882 2885 j1=str2double(get(handles.j1,'String')); 2883 2886 NbField_j_cell=get(handles.MaxIndex_j,'String'); 2884 2887 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 files2888 [RootFile,index_string,FrameIndex]=index2filename(UvData.XmlData{1}.FileSeries,i1,j1,NbField_j); 2886 2889 set(handles.RootFile,'String',RootFile) 2887 2890 else -
trunk/src/xml2struct.m
r1150 r1183 39 39 catch ME 40 40 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')) 42 42 errormsg=[errormsg ': package xmltree not correctly installed, reload it from www.artefact.tk/software/matlab/xml']; 43 43 end … … 52 52 end 53 53 end 54 if nargin>1 54 if nargin>1 % additional input vartiable(s) beyond filename, select specified subtrees 55 55 for isub=1:nargin-1 56 56 uid_sub=find(t,['/' RootTag '/' varargin{isub}]); … … 58 58 s.(varargin{isub})=[]; 59 59 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 end60 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 65 65 end 66 66 end 67 67 else 68 68 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 71 71 catch ME 72 72 errormsg=ME.message; … … 86 86 case 'char' 87 87 % 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 file89 %out=ss; %reproduce the input string90 %else88 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 91 91 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 92 92 if isempty(out) … … 102 102 end 103 103 end 104 %end104 end 105 105 case 'cell' 106 106 out={};%default
Note: See TracChangeset
for help on using the changeset viewer.
