- Timestamp:
- Mar 23, 2026, 4:49:29 PM (5 hours ago)
- Location:
- trunk/src
- Files:
-
- 1 added
- 4 deleted
- 15 edited
-
PARAM.xml.default (deleted)
-
browse_data.m (modified) (1 diff)
-
check_files.m (modified) (5 diffs)
-
civ.m (modified) (3 diffs)
-
cluster_command.m (deleted)
-
cluster_command_LEGI.m (added)
-
command_launch_matlab.m (modified) (4 diffs)
-
keyboard_callback.m (modified) (1 diff)
-
nc2struct.m (modified) (1 diff)
-
plot_field.m (modified) (1 diff)
-
px_XYZ.m (modified) (5 diffs)
-
read_civxdata.m (deleted)
-
script_check_required_toolbox.m (modified) (1 diff)
-
series.xml.default (modified) (1 diff)
-
series/civ2vel_3C.m (modified) (2 diffs)
-
series/civ_input.m (modified) (1 diff)
-
series/civ_series.m (modified) (7 diffs)
-
series/usr_fct/clean_civ_cmx.m (deleted)
-
uvmat.fig (modified) (previous)
-
uvmat.m (modified) (31 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/browse_data.m
r1179 r1201 1 1 2 %'browse_data': function for scanning d irectories in a campaign2 %'browse_data': function for scanning data tree in a project 3 3 %------------------------------------------------------------------------ 4 4 % function varargout = series(varargin) -
trunk/src/check_files.m
r1179 r1201 43 43 'check_files';... 44 44 'civ';... % key function for image correlations (called by series/cvi_series.m) 45 'cluster_command ';...% creates the command string for launching jobs in the cluster system 'oar'.45 'cluster_command_LEGI';...% creates the command string for launching jobs in the cluster system 'oar'. 46 46 'command_launch_matlab';% creates the command strings for opening a new Matlab session 47 47 'command_load_python';% creates the command strings for loading Python … … 81 81 'nc2struct';...% transform a netcdf file in a corresponding matlab structure 82 82 'num2stra';...% transform number to the corresponding character string depending on the nomenclature 83 'parciv';... % same as civ.m, but for loop replaced by 'parfor' for parallel computing on local computer 83 84 'phys_XYZ';...% transform coordiantes from pixels to phys 84 85 'px_XYZ';...% transform coordiantes from phys to pixels … … 86 87 'plot_object';...%draws a projection object (points, line, plane...) 87 88 'proj_field';...%project a field on a projection object (plane, line,...) 88 'read_civxdata';...reads civx data from netcdf files89 89 'read_civdata';... reads new civ data from netcdf files 90 90 'read_field';...% read the fields from files in different formats (netcdf files, images, video) … … 104 104 'set_object.m';...% edit a projection object 105 105 'set_object.fig';...% interface for set_object 106 'set_slices.mlapp';% creates illumination slices in 3D context 106 107 'set_subdomains';...% sort a set of points defined by scattered coordinates in subdomains, as needed for tps interpolation 107 108 'stra2num';...% transform letters (a, b, A, B,) or numerical strings ('1','2'..) to the corresponding numbers … … 117 118 'uigetfile_uvmat';... browser, and display of directories, faster than the Matlab fct uigetfile 118 119 'update_imadoc';... %update the ImaDoc xml file 119 'update_waitbar';... update the waitbar display, used for ACTION functions in the GUI 'series'120 120 'uvmat';...% master function for file scanning and visualisation of 2D fields 121 121 'uvmat.fig';... %interface for uvmat -
trunk/src/civ.m
r1199 r1201 129 129 SearchRange_2=par_civ.SearchRange(2); 130 130 if par_civ.CorrSmooth~=0 % par_civ.CorrSmooth=0 implies no civ computation (just input image and grid points given) 131 parfor ivec=1:nbvec 132 % iref=round(par_civ.Grid(ivec,1));% xindex on the image A for the middle of the correlation box 133 % jref=round(npy_ima-par_civ.Grid(ivec,2));% j index for the middle of the correlation box in the image A 131 for ivec=1:nbvec 134 132 iref=xtable(ivec);% xindex on the image A for the middle of the correlation box 135 133 jref=ytable(ivec);% j index for the middle of the correlation box in the image A … … 230 228 utable(ivec)=vector(1)*mesh+shiftx(ivec); 231 229 vtable(ivec)=-vector(2)*mesh+shifty(ivec);% vtable and shifty in image coordinates (opposite to pixel shift) 232 % xtable(ivec)=iref+utable(ivec)/2-0.5;% convec flow (velocity taken at the point middle from imgae 1 and 2)233 % ytable(ivec)=jref+vtable(ivec)/2-0.5;% and position of pixel 1=0.5 (convention for image coordinates=0 at the edge)234 % iref=round(xtable(ivec)+0.5);% nearest image index for the middle of the vector235 % jref=round(ytable(ivec)+0.5);236 % eliminate vectors located in the mask237 % if checkmask && (iref<1 || jref<1 ||iref>npx_ima || jref>npy_ima ||( par_civ.Mask(jref,iref)<200 && par_civ.Mask(jref,iref)>=100))238 % utable(ivec)=0;239 % vtable(ivec)=0;240 % FF(ivec)=1;241 % end242 230 ctable(ivec)=corrmax/sum_square;% correlation value 243 231 catch ME … … 354 342 [X,Y]=meshgrid(x_vec,y_vec); 355 343 coord=[reshape(X,[],1) reshape(Y,[],1)]; 356 result_conv=reshape(result_conv(y_ind,x_ind),[],1); 357 358 344 result_conv=reshape(result_conv(y_ind,x_ind),[],1); 359 345 % n=numel(X); 360 346 % x=[X Y]; -
trunk/src/command_launch_matlab.m
r1184 r1201 1 %'command_launch_matlab': creates the command strings for opening a new Matlab session 1 %'command_launch_matlab': creates the command strings for opening a new Matlab session 2 2 % and running a programme in a Linux system('GLNX86','GLNXA64','MACI64') 3 3 %------------------------------------------------------------------------ … … 6 6 %OUTPUT 7 7 % cmd=set of system commands (char string) to write in an executable file: [fid,message]=fopen(file_exe,'w'); 8 % fprintf(fid,cmd); % fill the executable file with the char string cmd9 % fclose(fid); % close the executable file10 % system(['chmod +x ' file_exe]); % set the file to executable11 % system([file_exe ' &'])% execute the command file12 8 % fprintf(fid,cmd); % fill the executable file with the char string cmd 9 % fclose(fid); % close the executable file 10 % system(['chmod +x ' file_exe]); % set the file to executable 11 % system([file_exe ' &'])% execute the command file 12 13 13 % 14 14 %INPUT: … … 28 28 matlab_ver = ver('MATLAB'); 29 29 matlab_version = matlab_ver.Version; 30 % matlab launch options: 31 % -nodisplay: no graphic display 32 % -nodesktop: disables the desktop environment. 33 % replaces -nojvm: no Java-related overhead (useful for scripts or batch jobs) 34 % TODO : replace all these options by -batch for newer Matlab versions 30 35 cmd=[... 31 36 '#!/bin/bash\n'... … … 34 39 'module load matlab/' matlab_version '\n'...% CHOICE OF THE SAME MATLAB VERSION AS THE CURRENT MATLAB SESSION (not mandatory) 35 40 'time_start=$(date +%%s)\n'... 36 'matlab -nodisplay -nosplash -no jvm''' ThreadOption ''' -logfile ''' filelog ''' <<END_MATLAB\n'...%launch the new Matlab session without display41 'matlab -nodisplay -nosplash -nodesktop ''' ThreadOption ''' -logfile ''' filelog ''' <<END_MATLAB\n'...%launch the new Matlab session without display 37 42 'addpath(''' path_uvmat ''');\n'... 38 43 'current_dir=pwd;\n'... % current working dir 39 44 'cd(''' ActionPath ''');\n'... 40 'h_fun=str2func(''' ActionName ''');\n'...% create the function handle for the function ActionName 41 'cd(current_dir);\n']; 42 % 'addpath(''' ActionPath ''');\n']; 45 'h_fun=str2func(''' ActionName ''');\n'...% create the function handle for the function ActionName 46 'cd(current_dir);\n']; 43 47 for iprocess=1:numel(inputxml) 44 % cmd=[cmd '' ActionName '(''' inputxml{iprocess} ''');\n']; 45 cmd=[cmd ' h_fun (''' inputxml{iprocess} ''');\n']; 48 cmd=[cmd ' h_fun (''' inputxml{iprocess} ''');\n']; 46 49 end 47 50 cmd=[cmd 'exit\n' 'END_MATLAB\n']; 48 if strcmp(option,'background')51 if strcmp(option,'background') 49 52 cmd=[cmd ... 50 'time_end=$(date +%%s)\n'...51 'echo "global time = " $(($time_end - $time_start)) >> ''' filelog '''\n'];52 end53 'time_end=$(date +%%s)\n'... 54 'echo "global time = " $(($time_end - $time_start)) >> ''' filelog '''\n']; 55 end 53 56 54 57 -
trunk/src/keyboard_callback.m
r1184 r1201 1 %'keyboard_callback:' function activated when a key is pressed on the keyboard 1 %'keyboard_callback:' function activated when a key is pressed on the keyboard when a figure has been selected by the mouse (callback `KeyPressFcn` of Matlab). 2 2 %----------------------------------- 3 3 -
trunk/src/nc2struct.m
r1196 r1201 1 2 %'nc2struct': transform a NetCDF file in a corresponding matlab structure 1 %'nc2struct': reads a NetCDF file as a corresponding Matlab structure. 3 2 % or directly read the a matlab data file .mat (calling the fct mat2struct.m) 4 3 % it reads all the global attributes and all variables, or a selected list. -
trunk/src/plot_field.m
r1200 r1201 1 %'plot_field': plot any field with the structure defined in the uvmat package1 %'plot_field': plots a field (vectors, scalar or images, or usual x,y plot), depending on the input field object and plotting parameters defined in uvmat. 2 2 %------------------------------------------------------------------------ 3 3 % -
trunk/src/px_XYZ.m
r1127 r1201 1 %'px_XYZ': transform physical to image coordinates.1 %'px_XYZ': transforms physical to image coordinates. 2 2 %------------------------------------------------------------------------ 3 %[X,Y]=px_XYZ(Calib, Xphys,Yphys,Zphys)3 %[X,Y]=px_XYZ(Calib,Slice,Xphys,Yphys,Zphys) 4 4 %------------------------------------------------------------------------ 5 5 % OUTPUT: … … 8 8 % INPUT: 9 9 % Calib: structure containing calibration parameters 10 % Slice: structure indicating the plane cut position 10 11 % Xphys,Yphys,Zphys; vectors of physical coordinates for a set of points 11 12 … … 41 42 %%%%%%%%%%%%% 42 43 if isempty(Slice) 43 Slice=Calib; 44 Slice=Calib;% old convention (< 2022) 44 45 end 45 46 % general case … … 51 52 if H>Zphys 52 53 Zphys=H-(H-Zphys)/Slice.RefractionIndex; %corrected z (virtual object)Calib 53 54 % test_refraction=1;55 54 end 56 55 end 57 56 58 57 %camera coordinates 59 Zphys=Zphys;%flip z coordinates60 58 xc=R(1)*Xphys+R(2)*Yphys+R(3)*Zphys+Calib.Tx_Ty_Tz(1); 61 59 yc=R(4)*Xphys+R(5)*Yphys+R(6)*Zphys+Calib.Tx_Ty_Tz(2); … … 69 67 if ~isfield(Calib,'kc') 70 68 r2=1; %no quadratic distortion 71 elseif numel(Calib.kc)==169 elseif isscalar(Calib.kc) 72 70 r2=1+Calib.kc*(Xu.*Xu+Yu.*Yu); 73 71 else -
trunk/src/script_check_required_toolbox.m
r1179 r1201 1 %'script_check_required_toolbox': checks the Matlab toolboxes required for 2 %each function of the package UVMAT 3 1 4 %% check list of fcts in main folder 5 disp('%%%%%%%%%%%% fcts in the master folder UVMAT %%%%%%%%%%%%') 2 6 [~,~,~,list_fct]=check_files; 3 7 for ilist=1:numel(list_fct) 4 8 [~, pList] = matlab.codetools.requiredFilesAndProducts(list_fct{ilist}); 5 disp([list_fct{ilist} ': ' {pList.Name}]) 9 Name_str=''; 10 for iname=1:numel(pList) 11 Name_str=[Name_str ' ' pList(iname).Name]; 12 end 13 disp([list_fct{ilist} ': ' Name_str]) 6 14 end 7 15 8 16 str=which('UVMAT'); 9 path_uvmat=fileparts(str) 17 path_uvmat=fileparts(str); 10 18 11 19 %% check list of fcts in transform_field 20 disp('%%%%%%%%%%%% fcts in UVMAT/transform_field %%%%%%%%%%%%') 12 21 dir_fct=fullfile(path_uvmat,'transform_field'); 13 22 list_fct=dir(dir_fct); 14 23 for ilist=1:numel(list_fct) 15 24 if ~isempty(regexp(list_fct(ilist).name,'.m$', 'once')) 16 [~, pList] = matlab.codetools.requiredFilesAndProducts(fullfile(dir_fct,list_fct(ilist).name)); 17 disp([list_fct(ilist).name ': ' {pList.Name}]) 25 [~, pList] = matlab.codetools.requiredFilesAndProducts(fullfile(dir_fct,list_fct(ilist).name)); 26 Name_str=''; 27 for iname=1:numel(pList) 28 Name_str=[Name_str ' ' pList(iname).Name]; 29 end 30 disp([list_fct(ilist).name ': ' Name_str]) 18 31 end 19 32 end 20 33 21 34 %% check list of fcts in series 35 disp('%%%%%%%%%%%% fcts in UVMAT/series %%%%%%%%%%%%') 22 36 dir_fct=fullfile(path_uvmat,'series'); 23 37 list_fct=dir(dir_fct); 24 38 for ilist=1:numel(list_fct) 25 39 if ~isempty(regexp(list_fct(ilist).name,'.m$', 'once')) 26 [~, pList] = matlab.codetools.requiredFilesAndProducts(fullfile(dir_fct,list_fct(ilist).name)); 27 disp([list_fct(ilist).name ': ' {pList.Name}]) 40 [~, pList] = matlab.codetools.requiredFilesAndProducts(fullfile(dir_fct,list_fct(ilist).name)); 41 Name_str=''; 42 for iname=1:numel(pList) 43 Name_str=[Name_str ' ' pList(iname).Name]; 44 end 45 disp([list_fct(ilist).name ':' Name_str]) 28 46 end 29 47 end -
trunk/src/series.xml.default
r1200 r1201 10 10 <WallTimeMax unit="hour">23</WallTimeMax> <!-- maximum allowed time for a job --> 11 11 <JobStatCmd>oarstat |grep N=UVmat</JobStatCmd> <!-- command to know the number of active and waiting job launches --> 12 <LaunchCmdFcn>cluster_command </LaunchCmdFcn> <!-- name of the function used to create job launch commmand -->12 <LaunchCmdFcn>cluster_command_LEGI</LaunchCmdFcn> <!-- name of the function used to create job launch commmand --> 13 13 </ClusterParam> 14 14 </SeriesParam> -
trunk/src/series/civ2vel_3C.m
r1157 r1201 52 52 53 53 function ParamOut=civ2vel_3C(Param) 54 disp('test') 54 55 55 %% set the input elements needed on the GUI series when the function is selected in the menu ActionName or InputTable refreshed 56 56 if isstruct(Param) && isequal(Param.Action.RUN,0) … … 349 349 V1=Data{1}.V; 350 350 end 351 Ua=griddata(X1,Y1,U1,Xa,Ya); 351 Ua=griddata(X1,Y1,U1,Xa,Ya);% interpolate PIV data positions to the common grid Xa,Ya 352 352 Va=griddata(X1,Y1,V1,Xa,Ya); 353 353 [Ua,Va,Xa,Ya]=Ud2U(XmlData{1}.GeometryCalib,Xa,Ya,Ua,Va); % convert Xd data to X -
trunk/src/series/civ_input.m
r1200 r1201 1589 1589 function TestCiv1_Callback(hObject, eventdata, handles) 1590 1590 %------------------------------------------------------------------------ 1591 drawnow 1591 drawnowci 1592 1592 if get(handles.TestCiv1,'Value') 1593 1593 set(handles.TestCiv1,'BackgroundColor',[1 1 0])% paint TestCiv1 button to yellow to confirm civ launch -
trunk/src/series/civ_series.m
r1200 r1201 46 46 %======================================================================= 47 47 48 function [Data,errormsg ,result_conv]= civ_series(Param)48 function [Data,errormsg]= civ_series(Param) 49 49 errormsg=''; 50 50 … … 398 398 if strcmp(NomTypeNc,'_1-2_1')% case of volume,backgrounds act on different j levels 399 399 backgroundname=fullfile_uvmat(RootPath_background,SubDir_background,RootFile_background,Ext_background,'_1',j1_series_Civ1(ifield)); 400 elseif isfield(par_civ1,'NbSlice') && ~isequal(par_civ1.NbSlice,1)400 elseif isfield(par_civ1,'NbSlice') 401 401 i1_background=mod(i1-1,par_civ1.NbSlice)+1; 402 402 backgroundname=fullfile_uvmat(RootPath_background,SubDir_background,RootFile_background,Ext_background,'_1',i1_background); … … 490 490 if ~isempty(i2_series_Civ1)&& ~isequal(i1_series_Civ1,i2_series_Civ1)% case of volume,masks act on different j levels 491 491 maskname=fullfile_uvmat(RootPath_mask,SubDir_mask,RootFile_mask,Ext_mask,'_1',j1); 492 elseif isfield(par_civ1,'NbSlice') && ~isequal(par_civ1.NbSlice,1)492 elseif isfield(par_civ1,'NbSlice') 493 493 i1_mask=mod(i1-1,par_civ1.NbSlice)+1; 494 494 maskname=fullfile_uvmat(RootPath_mask,SubDir_mask,RootFile_mask,Ext_mask,'_1',i1_mask); … … 530 530 531 531 % caluclate velocity data 532 % [Data.Civ1_X,Data.Civ1_Y,Data.Civ1_U,Data.Civ1_V,Data.Civ1_C,Data.Civ1_FF, result_conv, errormsg] = civ (par_civ1); 533 [Civ_X,Civ_Y,Civ_U,Civ_V,Civ_C,Civ_FF, result_conv, errormsg] = civ (par_civ1); 532 if strcmp(Param.RunMode,'cluster') 533 [Civ_X,Civ_Y,Civ_U,Civ_V,Civ_C,Civ_FF,~, errormsg] = civ (par_civ1);% single processor used in cluster 534 else 535 [Civ_X,Civ_Y,Civ_U,Civ_V,Civ_C,Civ_FF,errormsg] = parciv (par_civ1);%use parfor loop 536 end 534 537 Civ_X_shifted=Civ_X-0.5+Civ_U/2;% get the exact positions 535 538 Civ_Y_shifted=Civ_Y-0.5+Civ_V/2; … … 680 683 if ~isempty(i2_series_Civ2)% case of volume,backgrounds act on different j levels 681 684 backgroundname=fullfile_uvmat(RootPath_background,SubDir_background,RootFile_background,Ext_background,'_1',j1); 682 elseif isfield(par_civ2,'NbSlice') && ~isequal(par_civ2.NbSlice,1)685 elseif isfield(par_civ2,'NbSlice') 683 686 i1_background=mod(i1-1,par_civ2.NbSlice)+1; 684 687 backgroundname=fullfile_uvmat(RootPath_background,SubDir_background,RootFile_background,Ext_background,'_1',i1_background); … … 804 807 end 805 808 maskname=fullfile_uvmat(RootPath_mask,SubDir_mask,RootFile_mask,Ext_mask,'_1',j1); 806 elseif isfield(par_civ2,'NbSlice') && ~isequal(par_civ2.NbSlice,1)809 elseif isfield(par_civ2,'NbSlice') 807 810 i1=i1_series_Civ2(ifield); 808 811 i1_mask=mod(i1-1,par_civ2.NbSlice)+1; … … 855 858 end 856 859 857 % calculate velocity data 858 [Civ_X,Civ_Y,Civ_U,Civ_V,Civ_C,Civ_FF,~, errormsg] = civ (par_civ2); 860 % calculate velocity data 861 if strcmp(Param.RunMode,'cluster') 862 [Civ_X,Civ_Y,Civ_U,Civ_V,Civ_C,Civ_FF,~, errormsg] = civ (par_civ2);% single processor used in cluster 863 else 864 [Civ_X,Civ_Y,Civ_U,Civ_V,Civ_C,Civ_FF,errormsg] = parciv (par_civ2);%use parfor loop 865 end 859 866 Civ_X_shifted=Civ_X-0.5+Civ_U/2;% get the exact positions 860 867 Civ_Y_shifted=Civ_Y-0.5+Civ_V/2; -
trunk/src/uvmat.m
r1200 r1201 1 %'uvmat': function associated with the GUI 'uvmat.fig' for images and data field visualization1 %'uvmat': function associated with the master GUI 'uvmat.fig' for the visualisation of images and data fields 2 2 %------------------------------------------------------------------------ 3 3 % function huvmat=uvmat(input) … … 220 220 221 221 %% EXPORT menu 222 export_menu={' as field in workspace';'in new figure';'on existing axis';'make movie';'more...'};222 export_menu={'field in workspace';'field in new figure';'field on existing axis';'make movie';'create mirror data tree';'more...'}; 223 223 224 224 %% load the list of previously browsed files in menus Open, Open_1 and TransformName … … 363 363 CoordinatesPanelHeight=100; 364 364 ScalarPanelHeight=150; 365 FieldIndicesHeight=220; 366 NavigateHeight=120; 367 TransformHeight=100; 368 ObjectsHeight=150; 365 369 Interval=2; 366 370 … … 433 437 434 438 %% reset position and scale of axis 435 pos(1)= 0.2*size_uvmat(3)+35;436 pos(2)=50; 437 pos(3)= 0.77*size_uvmat(3)-1.2*ColumnWidth;439 pos(1)=1.2*ColumnWidth+50;%axis x position 440 pos(2)=50;%axis y position 441 pos(3)=size_uvmat(3)-2.2*ColumnWidth-100;%axis width 438 442 pos(4)=pos_InputFile(2)-50-Interval; 439 443 set(handles.PlotAxes,'Units','pixels') … … 441 445 %set(handles.PlotAxes,'Units','normalized') 442 446 UvData=get(handles.uvmat,'UserData'); 443 UvData.PosColorbar([1 3])=[pos(1)+pos(3)+10 1 0]/size_uvmat(3);447 UvData.PosColorbar([1 3])=[pos(1)+pos(3)+10 15]/size_uvmat(3);%x position and width of the colorbar 444 448 UvData.PosColorbar([2 4])=[pos(2)+pos(3)/4 pos(3)/2]/size_uvmat(4); 445 449 set(handles.uvmat,'UserData',UvData) 446 450 447 %% reset position of Field Indices TODO 448 % set(handles.FieldIndices,'Units','pixels') 449 % pos_4(1)=size_uvmat(3)-ColumnWidth; % set 'Scalar' to the right of the fig 450 % if strcmp(get(handles.Scalar,'Visible'),'on') 451 % pos_4(2)=pos_3(2)-ScalarPanelHeight-Interval; % set 'Scalar' to the lower edge of frame 'Coordinates' if visible 452 % else 453 % pos_4(2)=pos_3(2)-Interval;% set 'Scalar' to the lower edge of frame 'text display' if unvisible 454 % end 455 % pos_4(3)=ColumnWidth; 456 % pos_4(4)=ScalarPanelHeight; 457 % set(handles.Scalar,'Position',pos_4) 451 %% reset position of Field Indices 452 set(handles.FieldIndices,'Units','pixels') 453 pos_1(1)=Interval; % set 'Scalar' to the right of the fig 454 pos_1(2)=pos_InputFile(2)-FieldIndicesHeight-Interval; 455 pos_1(3)=1.2*ColumnWidth; % set 'Scalar' to the lower edge of frame 'Coordinates' if visible 456 pos_1(4)=FieldIndicesHeight; 457 set(handles.FieldIndices,'Position',pos_1) 458 459 %% reset position of Navigation 460 set(handles.Navigation,'Units','pixels') 461 pos_2(1)=Interval; % set 'Scalar' to the right of the fig 462 pos_2(2)=pos_1(2)-NavigateHeight-Interval; 463 pos_2(3)=1.2*ColumnWidth; % set 'Scalar' to the lower edge of frame 'Coordinates' if visible 464 pos_2(4)=NavigateHeight; 465 set(handles.Navigation,'Position',pos_2) 466 467 %% reset position of Transform 468 set(handles.Transform,'Units','pixels') 469 pos_3(1)=Interval; % set 'Scalar' to the right of the fig 470 pos_3(2)=pos_2(2)-TransformHeight-Interval; 471 pos_3(3)=1.2*ColumnWidth; % set 'Scalar' to the lower edge of frame 'Coordinates' if visible 472 pos_3(4)=TransformHeight; 473 set(handles.Transform,'Position',pos_3) 474 475 %% reset position of Objects 476 set(handles.Objects,'Units','pixels') 477 pos_4(1)=Interval; % set 'Scalar' to the right of the fig 478 pos_4(2)=pos_3(2)-ObjectsHeight-Interval; 479 pos_4(3)=1.2*ColumnWidth; % set 'Scalar' to the lower edge of frame 'Coordinates' if visible 480 pos_4(4)=ObjectsHeight; 481 set(handles.Objects,'Position',pos_4) 482 483 %% reset position of Histogram 484 set(handles.Histogram_txt,'Units','pixels') 485 set(handles.HistoMenu,'Units','pixels') 486 set(handles.LogLinHisto,'Units','pixels') 487 set(handles.HistoAxes,'Units','pixels') 488 set(handles.Histogram_txt,'FontSize',16) 489 set(handles.Histogram_txt,'Position',[Interval pos_4(2)-20-Interval 0.5*ColumnWidth-Interval 20]) 490 set(handles.HistoMenu,'Position',[2*Interval+0.5*ColumnWidth pos_4(2)-20-Interval 0.35*ColumnWidth-Interval 20]) 491 set(handles.LogLinHisto,'Position',[3*Interval+0.85*ColumnWidth pos_4(2)-20-Interval 0.35*ColumnWidth-Interval 20]) 492 set(handles.HistoAxes,'Position',[40 pos_4(2)-220-Interval 1.2*ColumnWidth-40 180]) 493 458 494 459 495 %------------------------------------------------------------------------ … … 831 867 else 832 868 current_dir=pwd;%current working dir 869 export_fct_name=get(handles.MenuExportCustom,'label'); 833 870 cd(fullfile(fileparts(which('uvmat')),'export_fct')) 834 871 export_handle=str2func(export_fct_name);% pick the relevant export fct in the folder UVMAT/export_fct … … 853 890 854 891 % ----------------------------------------------------------------------- 892 % --- called by menu bar Projection object/points 855 893 function Menupoints_Callback(hObject, eventdata, handles) 856 894 %------------------------------------------------------------------------ … … 861 899 862 900 % ----------------------------------------------------------------------- 863 % --- Callback of the Menu command line 864 %------------------------------------------------------------------------ 901 % --- % --- called by menu bar Projection object/line 865 902 function Menuline_Callback(hObject, eventdata, handles) 866 903 %------------------------------------------------------------------------ … … 871 908 872 909 % ----------------------------------------------------------------------- 873 % --- Callback of the Menu command line_x 874 %------------------------------------------------------------------------ 910 % --- called by menu bar Projection object/line_x 875 911 function Menuline_x_Callback(hObject, eventdata, handles) 912 %------------------------------------------------------------------------ 876 913 877 914 data.Type='line_x'; … … 881 918 882 919 % ----------------------------------------------------------------------- 883 % --- Callback of the Menu command line_y 884 % ----------------------------------------------------------------------- 920 % --- called by menu bar Projection object/line_y 885 921 function Menuline_y_Callback(hObject, eventdata, handles) 922 %------------------------------------------------------------------------ 886 923 887 924 data.Type='line_y'; … … 899 936 900 937 %------------------------------------------------------------------------ 938 % --- called by menu bar Projection object/ 901 939 function Menupolygon_Callback(hObject, eventdata, handles) 902 940 %------------------------------------------------------------------------ … … 915 953 916 954 %------------------------------------------------------------------------ 955 % --- called by menu bar Projection object/ 917 956 function Menuellipse_Callback(hObject, eventdata, handles) 918 957 %------------------------------------------------------------------------ … … 923 962 924 963 %------------------------------------------------------------------------ 925 function MenuMaskObject_Callback(hObject, eventdata, handles) 964 % --- called by menu bar Projection object/ 965 function MenuMaskObject_Callback(hObject, eventdata, handles)% TO DELETE 926 966 %------------------------------------------------------------------------ 927 967 data.Type='polygon'; … … 932 972 933 973 %------------------------------------------------------------------------ 974 % --- called by menu bar Projection object/plane_xy: to project fields on a horizontal plane x,y 934 975 function Menuplane_Callback(hObject, eventdata, handles) 935 976 %------------------------------------------------------------------------ … … 939 980 create_object(data,handles) 940 981 941 % -------------------------------------------------------------------- 982 % ----------------------------------------------------------------------- 983 % --- called by menu bar Projection object/plane_z: to project fields on a vertical plane 942 984 function Menuplane_z_Callback(hObject, eventdata, handles) 985 %------------------------------------------------------------------------ 943 986 data.Type='plane_z'; 944 987 data.ProjMode='projection';%default … … 947 990 948 991 %------------------------------------------------------------------------ 992 % --- called by menu bar Projection object/volume (to check !!) 949 993 function Menuvolume_Callback(hObject, eventdata, handles) 950 994 %------------------------------------------------------------------------ … … 989 1033 end 990 1034 if isfield(UvData.Field,'CoordMesh')&&~isempty(UvData.Field.CoordMesh) 991 %data.RangeX=[UvData.Field.XMin UvData.Field.XMax];992 1035 data.DX=UvData.Field.CoordMesh; 993 1036 data.DY=UvData.Field.CoordMesh; … … 1067 1110 %------------------------------------------------------------------------ 1068 1111 function MenuBrowseObject_Callback(hObject, eventdata, handles) 1112 % --- called by menu bar Projection object/browse... 1069 1113 %------------------------------------------------------------------------ 1070 1114 %get the object file … … 1098 1142 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 1099 1143 %------------------------------------------------------------------------ 1144 % --- called by menu bar Tools/ruler 1100 1145 function MenuRuler_Callback(hObject, eventdata, handles) 1101 1146 %------------------------------------------------------------------------ … … 1112 1157 1113 1158 %------------------------------------------------------------------------ 1159 % --- called by menu bar Tools/geometry calibration 1114 1160 function MenuCalib_Callback(hObject, eventdata, handles) 1115 1161 %------------------------------------------------------------------------ … … 1140 1186 1141 1187 1142 % -------------------------------------------------------------------- 1143 % --- set the slice plane ro the set of slice planes when volume scan is used1188 % ----------------------------------------------------------------------- 1189 % --- called by menu bar Tools/set slice calibrationset the slice plane ro the set of slice planes when volume scan is used 1144 1190 function MenuSetSlice_Callback(hObject, eventdata, handles) 1145 % -------------------------------------------------------------------- 1191 % ----------------------------------------------------------------------- 1146 1192 %% suppress the second input field if exists 1147 1193 if get(handles.SubField,'Value') … … 1480 1526 delete(hset_slice) 1481 1527 1482 %----------------------------------------------------------------------- 1528 %------------------------------------------------------------------------ 1529 % --- called by menu bar Tools/LIF calibration 1483 1530 function MenuLIFCalib_Callback(hObject, eventdata, handles) 1484 1531 %------------------------------------------------------------------------ … … 1598 1645 end 1599 1646 XmlData.LIFCalib.RefLineCoord=LineData{3}.Coord; 1600 1601 %% rescale the image1602 % [nby,nbx]=size(UvData.Field.A);1603 % x=linspace(UvData.Field.Coord_x(1),UvData.Field.Coord_x(2),nbx)-nbx/2;1604 % y=linspace(UvData.Field.Coord_y(1),UvData.Field.Coord_y(2),nby)-nby/2;1605 % [X,Y]=meshgrid(x,y);1606 %coeff_quad=0.15*4/(nbx*nbx);% image luminosity reduced by 10% at the edge1607 %UvData.Field.A=double(UvData.Field.A).*(1+coeff_quad*(X.*X+Y.*Y));1608 1647 1609 1648 %% display the current image in polar axes with origin at the illumination source … … 1656 1695 AX=DataPol.radius; 1657 1696 AY=DataPol.theta; 1658 % dX=(AX(2)-AX(1))/(npx-1);1659 % dY=(AY(1)-AY(2))/(npy-1);%mesh of new pixels1660 1697 [R,Theta]=meshgrid(linspace(AX(1),AX(end),npx),linspace(AY(1),AY(end),npy));%matrix of radius and angles with the same size as DataPol 1661 1698 A=R.*Anorm; … … 1678 1715 gamma_coeff=NaN(1,npy); 1679 1716 fitlength=NaN(1,npy); 1680 %[ThetaMask,RMask] = cart2pol(MaskData.Coord(:,1)-x0,MaskData.Coord(:,2)-y0);1681 %ThetaMask=ThetaMask*180/pi1682 1717 for iY=1:npy% loop on the y index of the image in polar coordinate 1683 1718 ALine=A(iY,:);%profile of image luminosity log (vs radial index) … … 1790 1825 end 1791 1826 1792 1793 1794 %------------------------------------------------------------------------ 1795 function MenuMask_Callback(hObject, eventdata, handles) 1796 %------------------------------------------------------------------------ 1797 UvData=get(handles.uvmat,'UserData');%read UvData properties stored on the uvmat interface 1798 ListObj=UvData.ProjObject; 1799 select=zeros(1,numel(ListObj)); 1800 for iobj=1:numel(ListObj); 1801 if strcmp(ListObj{iobj}.ProjMode,'mask_inside')||strcmp(ListObj{iobj}.ProjMode,'mask_outside') 1802 select(iobj)=1; 1803 end 1804 end 1805 val=find(select); 1806 if isempty(val) 1807 msgbox_uvmat('ERROR','polygons must be first created by Projection object/mask polygon in the menu bar'); 1827 %------------------------------------------------------------------------ 1828 % --- called by menu bar Tools/make mask: produces a mask image from existing projection objects with ProjMode='mask inside' or 'mask_outside 1829 function MenuMask_Callback(hObject, eventdata, handles) 1830 %------------------------------------------------------------------------ 1831 UvData=get(handles.uvmat,'UserData');%read UvData properties stored on the uvmat interface 1832 1833 %% selects the appropriate projection objects 1834 select=false(1,numel(UvData.ProjObject));% selection flag on the list of projection objects, false by default 1835 for iobj=1:numel(UvData.ProjObject) 1836 if ismember(UvData.ProjObject{iobj}.ProjMode,{'mask_inside','mask_outside','inside'}) &&... 1837 isfield(UvData.ProjObject{iobj},'Coord') && isfield(UvData.ProjObject{iobj},'Type')% avoid empty or other wrong objects in the list 1838 select(iobj)=true;% select only the objects with appropriate projection mode 1839 end 1840 end 1841 val=find(select);% indices of the selected objects 1842 if isempty(val) 1843 msgbox_uvmat('ERROR','projection objects with ProjMode=mask_inside or mask_outside must be first created'); 1844 return 1845 else 1846 ProjObject=UvData.ProjObject(val);%list of appropriate objects to use 1847 end 1848 set(handles.ListObject,'Value',val);% indicate the used object in the list 1849 1850 %% initialise the flag image for mask 1851 if ~isfield(UvData.Field,'A') 1852 msgbox_uvmat('ERROR','an image needs to be opened to set the mask size'); 1853 return 1854 end 1855 npx=size(UvData.Field.A,2); 1856 npy=size(UvData.Field.A,1); 1857 xi=0.5:npx-0.5; 1858 yi=0.5:npy-0.5; 1859 [Xi,Yi]=meshgrid(xi,yi); 1860 flag=true(npy,npx); 1861 1862 %% scan the list of the selected projection objects 1863 for iobj=1:numel(ProjObject) 1864 flagobj=true(npy,npx); 1865 testphys=false; %coordinates in pixels by default 1866 if isfield(ProjObject{iobj},'CoordUnit') && ~isequal(ProjObject{iobj}.CoordUnit,'pixel') 1867 if isfield(UvData,'XmlData') 1868 if isfield(UvData.XmlData{1},'GeometryCalib') 1869 Calib=UvData.XmlData{1}.GeometryCalib; 1870 testphys=true; %flag to transform object coordinates into pixels 1871 Slice=[];% check for slices in 3D 1872 if isfield(UvData.XmlData{1},'Slice') 1873 Slice=UvData.XmlData{1}.Slice; 1874 end 1875 end 1876 end 1877 end 1878 X=ProjObject{iobj}.Coord(:,1); 1879 Y=ProjObject{iobj}.Coord(:,2); 1880 if testphys% transform the object into polygon, then to pixel coordinates 1881 if strcmp(ProjObject{iobj}.Type,'ellipse')% transform into polygon 1882 perimeter=2*pi*ProjObject{iobj}.RangeX*ProjObject{iobj}.RangeY; 1883 NbPoint=ceil(perimeter/UvData.Field.CoordMesh);% estimate the number of interpolation points according to estimated field mesh 1884 Theta=2*pi*(1:NbPoint)/NbPoint; %set of NbPoint angles 1885 X=X+ProjObject{iobj}.RangeX*cos(Theta);% correspondfing x positions 1886 Y=Y+ProjObject{iobj}.RangeY*sin(Theta);% correspondfing y positions 1887 elseif strcmp(ProjObject{iobj}.Type,'rectangle')% 1888 RangeX=ProjObject{iobj}.RangeX;% half side of the rectangle 1889 RangeY=ProjObject{iobj}.RangeY;% y axis of the ellipse 1890 Xflag=[X-RangeX X+RangeX X+RangeX X-RangeX];% coordinates of the corners 1891 Yflag=[Y-RangeY Y-RangeY Y+RangeY Y+RangeY]; 1892 else %polygon 1893 Xflag=X';Yflag=Y'; 1894 Xflag=[Xflag X(1)];Yflag=[Yflag Y(1)];% close the polygon before interpolation 1895 end 1896 if ~strcmp(ProjObject{iobj}.Type,'ellipse')% interpolate between flag points 1897 X=[]; Y=[]; 1898 for iflag=1:numel(Xflag)-1 1899 SegmentLength=sqrt((Xflag(iflag+1)-Xflag(iflag))^2+(Yflag(iflag+1)-Yflag(iflag))^2); 1900 NbPoint=ceil(SegmentLength/UvData.Field.CoordMesh); 1901 X=[X Xflag(iflag)+((0:NbPoint-1)/NbPoint)*(Xflag(iflag+1)-Xflag(iflag))];% interpolate between 'flag points' 1902 Y=[Y Yflag(iflag)+((0:NbPoint-1)/NbPoint)*(Yflag(iflag+1)-Yflag(iflag))]; 1903 end 1904 end 1905 ProjObject{iobj}.Type='polygon'; 1906 pos=[X' Y' zeros(numel(X),1)];% create the matrix for transform to pixel coordinates 1907 % introduce the plane of cut in 3D case 1908 if isfield(Slice,'SliceCoord') && length(Slice.SliceCoord)>=3 1909 if isfield(Slice,'SliceAngle')&&~isequal(Slice.SliceAngle,[0 0 0]) 1910 om=norm(Slice.SliceAngle);%norm of rotation angle in radians 1911 OmAxis=Slice.SliceAngle/om; %unit vector marking the rotation axis 1912 cos_om=cos(pi*om/180); 1913 sin_om=sin(pi*om/180); 1914 pos=cos_om*pos+sin_om*cross(OmAxis,pos)+(1-cos_om)*(OmAxis*pos')*OmAxis; 1915 end 1916 pos(:,1)=pos(:,1)+Slice.SliceCoord(1); 1917 pos(:,2)=pos(:,2)+Slice.SliceCoord(2); 1918 pos(:,3)=pos(:,3)+Slice.SliceCoord(3); 1919 end 1920 [X,Y]=px_XYZ(Calib,Slice,pos(:,1),pos(:,2),pos(:,3));% transform to pixel coordinates 1921 end 1922 if strcmp(ProjObject{iobj}.Type,'polygon') 1923 flagobj=~inpolygon(Xi,Yi,X',Y');%=0 inside the polygon, 1 outside 1924 elseif isequal(ProjObject{iobj}.Type,'ellipse') 1925 RangeX=max(ProjObject{iobj}.RangeX); 1926 RangeY=max(ProjObject{iobj}.RangeY); 1927 X2Max=RangeX*RangeX; 1928 Y2Max=RangeY*RangeY; 1929 distX=(Xi-ProjObject{iobj}.Coord(1,1)); 1930 distY=(Yi-ProjObject{iobj}.Coord(1,2)); 1931 flagobj=(distX.*distX/X2Max+distY.*distY/Y2Max)>1; 1932 elseif isequal(ProjObject{iobj}.Type,'rectangle') 1933 distX=abs(Xi-ProjObject{iobj}.Coord(1,1)); 1934 distY=abs(Yi-ProjObject{iobj}.Coord(1,2)); 1935 flagobj=distX>max(ProjObject{iobj}.RangeX) | distY>max(ProjObject{iobj}.RangeY); 1936 end 1937 if isequal(ProjObject{iobj}.ProjMode,'mask_outside') 1938 flagobj=~flagobj; 1939 end 1940 flag=flag & flagobj;% concatene the mask flag 1941 end 1942 imflag=uint8(255*(0.392+0.608*flag));% =100 for flag=0 (PIV vectors not computed when imflag<200) 1943 imflag=flip(imflag,1); 1944 1945 %% display the mask image for checking 1946 hfigmask=figure; 1947 set(hfigmask,'Name','mask image') 1948 vec=linspace(0,1,256);%define a linear greyscale colormap 1949 map=[vec' vec' vec']; 1950 colormap(map) 1951 image(imflag); 1952 1953 %% propose a mask name 1954 RootPath=get(handles.RootPath,'String'); 1955 SubDir=get(handles.SubDir,'String'); 1956 maskindex=get(handles.masklevel,'Value'); 1957 mask_name=fullfile_uvmat(RootPath,[SubDir '.mask'],'mask','.png','_1',maskindex); 1958 answer=msgbox_uvmat('INPUT_TXT','mask file name:', mask_name); 1959 1960 %% save the mask as requested 1961 if ~strcmp(answer,'Cancel') 1962 mask_dir=fileparts(answer); 1963 if ~exist(mask_dir,'dir') 1964 [success,msg]=mkdir(mask_dir); 1965 if success==0 1966 msgbox_uvmat('ERROR',['cannot create ' mask_dir ': ' msg]);%error message for directory creation 1808 1967 return 1809 else 1810 set(handles.ListObject,'Value',val); 1811 flag=1; 1812 if ~isfield(UvData.Field,'A') 1813 msgbox_uvmat('ERROR','an image needs to be opened to set the mask size'); 1814 return 1815 end 1816 npx=size(UvData.Field.A,2); 1817 npy=size(UvData.Field.A,1); 1818 xi=0.5:npx-0.5; 1819 yi=0.5:npy-0.5; 1820 [Xi,Yi]=meshgrid(xi,yi); 1821 for iobj=1:length(UvData.ProjObject) 1822 ObjectData=UvData.ProjObject{iobj}; 1823 if isfield(ObjectData,'ProjMode') &&(isequal(ObjectData.ProjMode,'mask_inside')||isequal(ObjectData.ProjMode,'mask_outside')); 1824 flagobj=1; 1825 testphys=0; %coordinates in pixels by default 1826 if isfield(ObjectData,'CoordUnit') && ~isequal(ObjectData.CoordUnit,'pixel') 1827 if isfield(UvData,'XmlData')&& isfield(UvData.XmlData{1},'GeometryCalib') 1828 Calib=UvData.XmlData{1}.GeometryCalib; 1829 testphys=1; 1830 end 1831 end 1832 if isfield(ObjectData,'Coord')&& isfield(ObjectData,'Type') 1833 if isequal(ObjectData.Type,'polygon') 1834 X=ObjectData.Coord(:,1); 1835 Y=ObjectData.Coord(:,2); 1836 if testphys 1837 pos=[X Y zeros(size(X))]; 1838 if isfield(Calib,'SliceCoord') && length(Calib.SliceCoord)>=3 1839 if isfield(Calib,'SliceAngle')&&~isequal(Calib.SliceAngle,[0 0 0]) 1840 om=norm(Calib.SliceAngle);%norm of rotation angle in radians 1841 OmAxis=Calib.SliceAngle/om; %unit vector marking the rotation axis 1842 cos_om=cos(pi*om/180); 1843 sin_om=sin(pi*om/180); 1844 pos=cos_om*pos+sin_om*cross(OmAxis,pos)+(1-cos_om)*(OmAxis*pos')*OmAxis; 1845 end 1846 pos(:,1)=pos(:,1)+Calib.SliceCoord(1); 1847 pos(:,2)=pos(:,2)+Calib.SliceCoord(2); 1848 pos(:,3)=pos(:,3)+Calib.SliceCoord(3); 1849 end 1850 [X,Y]=px_XYZ(Calib,Slice,pos(:,1),pos(:,2),pos(:,3)); 1851 end 1852 flagobj=~inpolygon(Xi,Yi,X',Y');%=0 inside the polygon, 1 outside 1853 elseif isequal(ObjectData.Type,'ellipse') 1854 if testphys 1855 %[X,Y]=px_XYZ(Calib,X,Y,0);% TODO:create a polygon boundary and transform to phys 1856 end 1857 RangeX=max(ObjectData.RangeX); 1858 RangeY=max(ObjectData.RangeY); 1859 X2Max=RangeX*RangeX; 1860 Y2Max=RangeY*RangeY; 1861 distX=(Xi-ObjectData.Coord(1,1)); 1862 distY=(Yi-ObjectData.Coord(1,2)); 1863 flagobj=(distX.*distX/X2Max+distY.*distY/Y2Max)>1; 1864 elseif isequal(ObjectData.Type,'rectangle') 1865 if testphys 1866 %[X,Y]=px_XYZ(Calib,X,Y,0);% TODO:create a polygon boundary and transform to phys 1867 end 1868 distX=abs(Xi-ObjectData.Coord(1,1)); 1869 distY=abs(Yi-ObjectData.Coord(1,2)); 1870 flagobj=distX>max(ObjectData.RangeX) | distY>max(ObjectData.RangeY); 1871 end 1872 if isequal(ObjectData.ProjMode,'mask_outside') 1873 flagobj=~flagobj; 1874 end 1875 flag=flag & flagobj; 1876 end 1877 end 1878 end 1879 %mask name 1880 RootPath=get(handles.RootPath,'String'); 1881 SubDir=get(handles.SubDir,'String'); 1882 RootFile=get(handles.RootFile,'String'); 1883 if ~isempty(RootFile)&&(isequal(RootFile(1),'/')|| isequal(RootFile(1),'\')) 1884 RootFile(1)=[]; 1885 end 1886 list=get(handles.masklevel,'String'); 1887 masknumber=num2str(length(list)); 1888 maskindex=get(handles.masklevel,'Value'); 1889 mask_name=fullfile_uvmat(RootPath,[SubDir '.mask'],'mask','.png','_1',maskindex); 1890 imflag=uint8(255*(0.392+0.608*flag));% =100 for flag=0 (vectors not computed when 20<imflag<200) 1891 imflag=flipdim(imflag,1); 1892 1893 %display the mask 1894 hfigmask=figure; 1895 set(hfigmask,'Name','mask image') 1896 vec=linspace(0,1,256);%define a linear greyscale colormap 1897 map=[vec' vec' vec']; 1898 colormap(map) 1899 image(imflag); 1900 answer=msgbox_uvmat('INPUT_TXT','mask file name:', mask_name); 1901 if ~strcmp(answer,'Cancel') 1902 mask_dir=fileparts(answer); 1903 if ~exist(mask_dir,'dir') 1904 [success,msg]=mkdir(mask_dir); 1905 if success==0 1906 msgbox_uvmat('ERROR',['cannot create ' mask_dir ': ' msg]);%error message for directory creation 1907 return 1908 end 1909 [success,msg] = fileattrib(mask_dir,'+w','g','s');% allow writing access for the group of users, recursively in the folder 1910 if success==0 1911 msgbox_uvmat('WARNING',{['unable to set group write access to ' mask_dir ':']; msg});%error message for directory creation 1912 end 1913 end 1914 try 1915 imwrite(imflag,answer,'BitDepth',8); 1916 catch ME 1917 msgbox_uvmat('ERROR',ME.message) 1918 end 1919 end 1920 set(handles.ListObject,'Value',1) 1921 end 1922 1923 %------------------------------------------------------------------------ 1924 %-- open the GUI set_grid.fig to create grid 1968 end 1969 [success,msg] = fileattrib(mask_dir,'+w','g','s');% allow writing access for the group of users, recursively in the folder 1970 if success==0 1971 msgbox_uvmat('WARNING',{['unable to set group write access to ' mask_dir ':']; msg});%error message for directory creation 1972 end 1973 end 1974 try 1975 imwrite(imflag,answer,'BitDepth',8); 1976 catch ME 1977 msgbox_uvmat('ERROR',ME.message) 1978 end 1979 end 1980 set(handles.ListObject,'Value',1) 1981 1982 %------------------------------------------------------------------------ 1983 %-- open the GUI set_grid.fig to create grid (TODO: check the relevance) 1925 1984 function MenuGrid_Callback(hObject, eventdata, handles) 1926 1985 %------------------------------------------------------------------------ … … 1934 1993 FileName=[fullfile(RootPath,SubDir,RootFile) FileIndex FileExt]; 1935 1994 UvData=get(handles.uvmat,'UserData'); 1936 % CoordList=get(handles.TransformName,'String');1937 % val=get(handles.TransformName,'Value');1938 1995 set_grid(FileName,UvData.Field);% call the set_object interface 1939 1996 1940 1997 %------------------------------------------------------------------------ 1941 %-- introduce a section FileSeries in the xml file ImaDoc to virtually relabel frames 1942 % -------------------------------------------------------------------- 1998 %--- called by menu bar Tools/relabel series: introduce a section FileSeries in the xml file ImaDoc to virtually relabel frames 1943 1999 function MenuRelabelFrames_Callback(hObject, eventdata, handles) 1944 2000 %------------------------------------------------------------------------ 1945 2001 [RootPath,SubDir,RootFile,FileIndex,FileExt]=read_file_boxes(handles); 1946 2002 FileName=[fullfile(RootPath,SubDir,RootFile) FileIndex FileExt]; … … 1981 2037 case 'rdvision'%TO CHECK****** 1982 2038 check_time_rdvision(FileName,XmlData) 1983 case 'telopsIR' 1984 2039 case 'telopsIR' 1985 2040 DirContent=dir(fullfile(RootPath,SubDir)); 1986 2041 NbFiles=0; … … 4249 4304 end 4250 4305 end 4251 4306 4252 4307 set(handles.uvmat,'UserData',UvData) 4253 4308 … … 4374 4429 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 4375 4430 % display menus and plot histograms 4376 test_v=0;4431 %test_v=0; 4377 4432 if ~isempty(menu_histo) 4378 4433 set(handles.HistoMenu,'Value',1) 4379 4434 set(handles.HistoMenu,'String',menu_histo) 4380 set(handles.Histogram ,'Visible','on')4435 set(handles.Histogram_txt,'Visible','on') 4381 4436 set(handles.HistoMenu,'Visible','on') 4382 4437 set(handles.LogLinHisto,'Visible','on') … … 6290 6345 function LogLinHisto_Callback(hObject, eventdata, handles) 6291 6346 HistoMenu_Callback(hObject, eventdata, handles) 6347 6348 6349 % -------------------------------------------------------------------- 6350 function MenuCreateMirror_Callback(hObject, eventdata, handles) 6351 % hObject handle to MenuCreateMirror (see GCBO) 6352 % eventdata reserved - to be defined in a future version of MATLAB 6353 % handles structure with handles and user data (see GUIDATA)
Note: See TracChangeset
for help on using the changeset viewer.
