Changeset 85
- Timestamp:
- Apr 25, 2010, 9:46:07 PM (15 years ago)
- Location:
- trunk/src
- Files:
-
- 9 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/civ.m
r84 r85 528 528 end 529 529 if isfield(XmlData,'Time') 530 time=XmlData.Time 530 time=XmlData.Time; 531 531 nbfield=size(time,1); 532 532 nburst=size(time,2); … … 2149 2149 else 2150 2150 msgbox_uvmat('ERROR','for BATCH option, UBC file names, beginning by \\, are needed'); 2151 set(handles.BATCH, 'Enable','On')2152 set(handles.BATCH,'BackgroundColor',[1 0 0])2151 % set(handles.BATCH, 'Enable','On') 2152 % set(handles.BATCH,'BackgroundColor',[1 0 0]) 2153 2153 return 2154 2154 end … … 2159 2159 [filecell,num1_civ1,num2_civ1,num_a_civ1,num_b_civ1,num1_civ2,num2_civ2,num_a_civ2,num_b_civ2,nom_type_nc,file_ref_fix1,file_ref_fix2]=... 2160 2160 set_civ_filenames(handles,compare,box_test); 2161 2161 if isempty(filecell) 2162 return 2163 end 2162 2164 %choice of batch priority 2163 2165 ind_answer=2; … … 2209 2211 nbslice_mask=get(handles.mask_fix1,'UserData'); % get the number of slices (= number of masks) 2210 2212 %%%%%%%%%%%%%COMPLETER LE PROGRAMME FIX 2211 % inf_sup=get(handles.inf_sup1,'Value'); 2213 % inf_sup=get(handles.inf_sup1,'Value');80 2212 2214 % fileref=get(handles.ref_fix1,'String'); 2213 2215 % refpath=get(handles.ref_fix1,'UserData'); … … 2680 2682 display(['!' filename_bat ' &']) 2681 2683 end 2682 % if(isunix)2683 % cmdtodo=['. ' filename_bat ];%removed for Mathieu tests %' && rm -f ' filename_bat] ;2684 % else2685 % cmdtodo=[filename_bat];%removed for Mathieu tests %' && del /F /Q ' filename_bat' ;2686 % end2687 % count= fprintf(p1,'%s\n', cmdtodo);2688 2684 end 2689 2685 end 2690 2686 end 2691 % if ~sge 2692 % fclose(p1); 2693 % fclose(p0); 2694 % delete(name_lock); 2695 % end 2696 2697 set(handles.BATCH, 'Enable','On') 2698 set(handles.BATCH,'BackgroundColor',[1 0 0]) 2687 % set(handles.BATCH, 'Enable','On') 2688 % set(handles.BATCH,'BackgroundColor',[1 0 0]) 2699 2689 2700 2690 %save interface state … … 2740 2730 set_civ_filenames(handles,compare,box_test) 2741 2731 %------------------------------------------------------------------------ 2732 filecell=[];%default 2742 2733 %get the filename root, nomenclature and numbers 2743 2734 filebase=get(handles.RootName,'String'); … … 3048 3039 set(handles.RUN, 'Enable','On') 3049 3040 set(handles.RUN,'BackgroundColor',[1 0 0]) 3050 set(handles.BATCH, 'Enable','On')3051 set(handles.BATCH,'BackgroundColor',[1 0 0])3052 filecell=[];3041 % set(handles.BATCH, 'Enable','On') 3042 % set(handles.BATCH,'BackgroundColor',[1 0 0]) 3043 filecell=[]; 3053 3044 cd(currentdir) 3054 3045 return … … 3160 3151 set(handles.RUN, 'Enable','On') 3161 3152 set(handles.RUN,'BackgroundColor',[1 0 0]) 3162 set(handles.BATCH, 'Enable','On')3163 set(handles.BATCH,'BackgroundColor',[1 0 0])3153 % set(handles.BATCH, 'Enable','On') 3154 % set(handles.BATCH,'BackgroundColor',[1 0 0]) 3164 3155 cd(currentdir) 3165 3156 return … … 5001 4992 path_to_uvmat=which ('uvmat');% check the path of uvmat 5002 4993 pathelp=fileparts(path_to_uvmat); 5003 helpfile=fullfile(pathelp,'uvmat_doc','uvmat_doc.html') 4994 helpfile=fullfile(pathelp,'uvmat_doc','uvmat_doc.html'); 5004 4995 if isempty(dir(helpfile)), msgbox_uvmat('ERROR','Please put the help file uvmat_doc.html in the sub-directory /uvmat_doc of the UVMAT package') 5005 4996 else -
trunk/src/find_field_indices.m
r19 r85 18 18 % .discrete: like scalar, but set of data points without continuity, represented as dots in a usual plot, instead of continuous lines otherwise 19 19 % .scalar: scalar field (default) 20 20 % 21 21 % 22 22 %INPUT: … … 72 72 testnewcell=1; 73 73 for icell_prev=1:numel(CellVarIndex)%detect whether the dimensions of ivar fit with an existing cell 74 PrevVarIndex=CellVarIndex{icell_prev}; 75 PrevDimName=Data.VarDimName{PrevVarIndex(1)}; 74 PrevVarIndex=CellVarIndex{icell_prev};%list of variable indices in cell # icell_prev 75 PrevDimName=Data.VarDimName{PrevVarIndex(1)};%list of corresponding variable names 76 76 if isequal(PrevDimName,DimCell) 77 77 CellVarIndex{icell_prev}=[CellVarIndex{icell_prev} ivar];% add variable index #ivar to the cell #icell_prev … … 154 154 end 155 155 NbDim(icell)=0;% nbre of space dimensions 156 if ~isempty(ivar_coord_z) 157 NbDim(icell)=3; 158 elseif ~isempty(ivar_coord_y) 159 NbDim(icell)=2; 160 elseif ~isempty(ivar_coord_x) 161 NbDim(icell)=1; 162 end 163 156 if numel(VarIndex)>1 157 if ~isempty(ivar_coord_z) 158 NbDim(icell)=3; 159 elseif ~isempty(ivar_coord_y) 160 NbDim(icell)=2; 161 elseif ~isempty(ivar_coord_x) 162 NbDim(icell)=1; 163 end 164 end 164 165 % look at coordinates variables 165 166 coord=zeros(1,numel(DimCell));%default -
trunk/src/name_generator.m
r65 r85 2 2 %--------------------------------------------------------------------- 3 3 % [filename,idetect,num_i1_out,num_j1_out,num_i2_out,num_j2_out,subdir_out]=... 4 %name_generator(filebase,num_i1,num_j1,ext,nom_type,comp_input,num_i2,num_j2,subdir);4 % name_generator(filebase,num_i1,num_j1,ext,nom_type,comp_input,num_i2,num_j2,subdir); 5 5 %--------------------------------------------------------------------- 6 6 % This function detects the existence the constructed file name and it can 7 7 % find indices according to file existence if they are not specified 8 % %rmq: this function is related to the reverse functions display2name and name2diplay8 % rmq: this function is related to the reverse functions display2name and name2diplay 9 9 %--------------------------------------------------------------------- 10 10 % OUTPUT: 11 % filename: string representing the file name (including path)12 % idetect: =1 if the file is detected, 0 otherwise13 % num_i1_out,num_j1_out,num_i2_out,num_j2_out,subdir_out: index numbers and subdirectory detected14 %for free input (= to the corresponding input indices when comp_input=1)11 % filename: string representing the file name (including path) 12 % idetect: =1 if the file is detected, 0 otherwise 13 % num_i1_out,num_j1_out,num_i2_out,num_j2_out,subdir_out: index numbers and subdirectory detected 14 % for free input (= to the corresponding input indices when comp_input=1) 15 15 %--------------------------------------------------------------------- 16 16 % INPUT: … … 20 20 % 'ext': file name extension (e.g. '.png' or '.nc') 21 21 % 'nom_type': string defining the kind of nomenclature used: 22 %nom_type='': constant name [filebase ext] (default output if 'nom_type' is undefined)23 %nom_type='*': the same file [filebase ext] contains successive fields (ex avi movies)24 %nom_type='_i': series of files with a single index i preceded by '_'(e.g. 'aa_45.png').25 %nom_type='#' series of indexed images wich is not series_i [filebase index ext], e.g. 'aa045.jpg' or 'aa45.tif'26 %nom_type='_i_j' matrix of files with two indices i and j separated by '_'(e.g. 'aa_45_2.png')27 %nom_type='_i1-i2' from pairs from a single index (e.g. 'aa_45-47.nc')28 %nom_type='_i_j1-j2'pairs of j indices (e.g. 'aa_45_2-3.nc')29 %nom_type='_i1-i2_j' pairs of i indices (e.g. 'aa_45-46_2.nc')30 %nom_type='#a','#A' with a numerical index and an index letter(e.g.'aa045b.png'), OBSOLETE (replaced by 'series_i_j')31 %nom_type='%03d' or '%04d', series of indexed images with numbers completed with zeros to 3 or 4 digits, e.g.'aa045.tif'32 %nom_type='_%03d', '_%04d', or '_%05d', series of indexed images with _ and numbers completed with zeros to 3, 4 or 5 digits, e.g.'aa_045.tif'33 %nom_type='raw_SMD', same as '#a' but with no extension ext='', OBSOLETE34 %nom_type='#_ab' from pairs of '#a' images (e.g. 'aa045bc.nc'), ext='.nc', OBSOLETE (replaced by 'netc_2D')35 %nom_type='%3dab' from pairs of '%3da' images (e.g. 'aa045bc.nc'), ext='.nc', OBSOLETE (replaced by 'netc_2D')36 % A REVOIR: 'comp_input'=1 for writting =0 for reading , 'comp_input'(for nom_type involving index pairs (e.g. netc))37 %comp_input=1: the index pair is imposed,38 %comp_input=0: the index pair is automatically searched, choosing the most recent file in case of multiple choice22 % nom_type='': constant name [filebase ext] (default output if 'nom_type' is undefined) 23 % nom_type='*': the same file [filebase ext] contains successive fields (ex avi movies) 24 % nom_type='_i': series of files with a single index i preceded by '_'(e.g. 'aa_45.png'). 25 % nom_type='#' series of indexed images wich is not series_i [filebase index ext], e.g. 'aa045.jpg' or 'aa45.tif' 26 % nom_type='_i_j' matrix of files with two indices i and j separated by '_'(e.g. 'aa_45_2.png') 27 % nom_type='_i1-i2' from pairs from a single index (e.g. 'aa_45-47.nc') 28 % nom_type='_i_j1-j2'pairs of j indices (e.g. 'aa_45_2-3.nc') 29 % nom_type='_i1-i2_j' pairs of i indices (e.g. 'aa_45-46_2.nc') 30 % nom_type='#a','#A' with a numerical index and an index letter(e.g.'aa045b.png'), OBSOLETE (replaced by 'series_i_j') 31 % nom_type='%03d' or '%04d', series of indexed images with numbers completed with zeros to 3 or 4 digits, e.g.'aa045.tif' 32 % nom_type='_%03d', '_%04d', or '_%05d', series of indexed images with _ and numbers completed with zeros to 3, 4 or 5 digits, e.g.'aa_045.tif' 33 % nom_type='raw_SMD', same as '#a' but with no extension ext='', OBSOLETE 34 % nom_type='#_ab' from pairs of '#a' images (e.g. 'aa045bc.nc'), ext='.nc', OBSOLETE (replaced by 'netc_2D') 35 % nom_type='%3dab' from pairs of '%3da' images (e.g. 'aa045bc.nc'), ext='.nc', OBSOLETE (replaced by 'netc_2D') 36 %'comp_input' (for nom_type involving index pairs (e.g. netc)) 37 % comp_input=1: the index pair is imposed, 38 % comp_input=0: the index pair is automatically searched, choosing the most recent file in case of multiple choice 39 39 % 'num_i2': second index i (for nom_type involving index pairs (e.g. netc)) 40 40 % 'num_j2': second index j (for nom_type involving index pairs (e.g. netc)) 41 41 % 'subdir': (used for nom_type=netc...) string representing the name of the subdirectory 'subdir' containing file. 42 %subdir='': no subdirectory,43 %subdir='?', the file is first searched with no subdirectory, then in the most recently modified subdirectory if not detected.42 % subdir='': no subdirectory, 43 % subdir='?', the file is first searched with no subdirectory, then in the most recently modified subdirectory if not detected. 44 44 45 45 % A FAIRE: si comp_inpu=0, si _i_j n'existe pas, chercher _i, -
trunk/src/plot_field.m
r82 r85 195 195 ind_select=find(NbDim>=2); 196 196 if numel(ind_select)>2 197 msgbox_uvmat('ERROR', ['more than two fields to map'])198 display( ['more than two fields to map'])197 msgbox_uvmat('ERROR','more than two fields to map') 198 display('more than two fields to map') 199 199 return 200 200 end -
trunk/src/uvmat.m
r84 r85 1622 1622 % III - MAIN REFRESH FUNCTIONS : 'FRAME PLOT' 1623 1623 %------------------------------------------------------------------- 1624 %------------------------------------------------------------------- 1625 1626 %Executes on button press in runplus: make one step forward and call 1627 %run0. The step forward is along the fields series 1 or 2 depending on 1628 %the scan_i and scan_j check box (exclusive each other) 1629 %------------------------------------------------------------------- 1624 1625 %------------------------------------------------------------------- 1626 % --- Executes on button press in runplus: make one step forward and call 1627 % --- run0. The step forward is along the fields series 1 or 2 depending on 1628 % --- the scan_i and scan_j check box (exclusive each other) 1630 1629 function runplus_Callback(hObject, eventdata, handles) 1630 %------------------------------------------------------------------- 1631 set(handles.runplus,'BackgroundColor',[1 1 0])%paint the command button in yellow 1632 drawnow 1631 1633 increment=str2num(get(handles.increment_scan,'String')); %get the field increment d 1632 1634 runpm(hObject,eventdata,handles,increment) 1633 1634 %------------------------------------------------------------------- 1635 % Executes on button press in runmin: make one step backward and call1636 % run0. The step backward is along the fields series 1 or 2 depending on1637 % the scan_i and scan_j check box (exclusive each other)1638 % -------------------------------------------------------------------1635 set(handles.runplus,'BackgroundColor',[1 0 0])%paint the command button in yellow 1636 1637 %------------------------------------------------------------------- 1638 % --- Executes on button press in runmin: make one step backward and call 1639 % --- run0. The step backward is along the fields series 1 or 2 depending on 1640 % --- the scan_i and scan_j check box (exclusive each other) 1639 1641 function runmin_Callback(hObject, eventdata, handles) 1642 %------------------------------------------------------------------- 1643 set(handles.runmin,'BackgroundColor',[1 1 0])%paint the command button in yellow 1644 drawnow 1640 1645 increment=-str2num(get(handles.increment_scan,'String')); %get the field increment d 1641 1646 runpm(hObject,eventdata,handles,increment) 1647 set(handles.runmin,'BackgroundColor',[1 0 0])%paint the command button in yellow 1642 1648 1643 1649 %------------------------------------------------------------------- … … 1703 1709 set(handles.MovieBackward,'BusyAction','Cancel') 1704 1710 set(handles.MenuExportMovie,'BusyAction','Cancel') 1705 1711 set(handles.movie_pair,'BackgroundColor',[1 0 0])%paint the command buttonback to red 1712 set(handles.Movie,'BackgroundColor',[1 0 0])%paint the command buttonback to red 1713 set(handles.MovieBackward,'BackgroundColor',[1 0 0])%paint the command buttonback to red 1706 1714 1707 1715 %------------------------------------------------------------------ … … 1836 1844 else 1837 1845 msgbox_uvmat('ERROR','an image or movie must be first introduced as input') 1846 set(handles.movie_pair,'BackgroundColor',[1 0 0])%paint the command button in red 1838 1847 return 1839 1848 end … … 1847 1856 if isempty(num_i2) 1848 1857 msgbox_uvmat('ERROR', 'a second image index i2 or j2 is needed to show the pair as a movie') 1858 set(handles.movie_pair,'BackgroundColor',[1 0 0])%paint the command button in red 1849 1859 return 1850 1860 else … … 1858 1868 if ~exist(imaname_1,'file') 1859 1869 msgbox_uvmat('ERROR',['second input open (-) ' imaname_1 ' not found']); 1870 set(handles.movie_pair,'BackgroundColor',[1 0 0])%paint the command button in red 1860 1871 return 1861 1872 end 1862 % set(handles.i2,'String',''); % indicates that the second index i2 is not used1863 % set(handles.j2,'String',''); % indicates that the second index i2 is not used1864 1873 1865 1874 %read the second image … … 1949 1958 function run0_Callback(hObject, eventdata, handles) 1950 1959 %------------------------------------------------------------------------ 1960 set(handles.run0,'BackgroundColor',[1 1 0])%paint the command button in yellow 1961 drawnow 1951 1962 filename=read_file_boxes(handles); 1952 1963 … … 1963 1974 msgbox_uvmat('ERROR',errormsg); 1964 1975 end 1965 1976 set(handles.run0,'BackgroundColor',[1 0 0]) 1966 1977 %------------------------------------------------------------------------ 1967 1978 % --- read the input files and refresh all the plots, including projection. … … 1978 1989 1979 1990 %initialisation 1980 set(handles.run0,'BackgroundColor',[1 1 0])%paint the command button in yellow 1981 drawnow 1991 1982 1992 errormsg=[]; % default error message 1983 1993 abstime=[]; … … 2815 2825 end 2816 2826 end 2817 set(handles.run0,'BackgroundColor',[1 0 0]) 2827 2818 2828 2819 2829 … … 3051 3061 FileName=[FileName FileIndices FileExt]; 3052 3062 3053 %---------------------------------------------- 3054 %read the data displayed for the second input rootfile windows 3055 %------------------------------------------------- 3063 %------------------------------------------------------------------------ 3064 % ---- read the data displayed for the second input rootfile windows 3056 3065 function [FileName_1,RootPath_1,FileBase_1,FileIndices_1,FileExt_1,SubDir_1]=read_file_boxes_1(handles) 3057 RootPath_1=get(handles.RootPath_1,'String'); % read the data from the file1_input window 3058 if isequal(RootPath_1,'"'),RootPath_1=get(handles.RootPath,'String'); end; 3066 %------------------------------------------------------------------------ 3067 RootPath_1=get(handles.RootPath_1,'String') % read the data from the file1_input window 3068 if isequal(get(handles.RootPath_1,'Visible'),'off') || isequal(RootPath_1,'"') 3069 RootPath_1=get(handles.RootPath,'String'); 3070 end; 3059 3071 FileName_1=RootPath_1; %default 3060 3072 SubDir_1=get(handles.SubDir_1,'String'); 3061 if isequal( SubDir_1,'"')3073 if isequal(get(handles.SubDir_1,'Visible'),'off')|| isequal(SubDir_1,'"') 3062 3074 SubDir_1=get(handles.SubDir,'String'); 3063 3075 end 3064 if ~isempty(SubDir_1) && ~isequal(SubDir_1,'')3076 if numel(SubDir_1)>=1 3065 3077 if (isequal(SubDir_1(1),'/')|| isequal(SubDir_1(1),'\')) 3066 3078 SubDir_1(1)=[]; %suppress possible / or \ separator … … 3069 3081 end 3070 3082 RootFile_1=get(handles.RootFile_1,'String'); 3071 if isequal(RootFile_1,'"'),RootFile_1=get(handles.RootFile,'String'); end; 3072 if ~isempty(RootFile_1) && ~isequal(RootFile_1,'') 3083 if isequal(get(handles.RootFile_1,'Visible'),'off') || isequal(RootFile_1,'"') 3084 RootFile_1=get(handles.RootFile,'String'); 3085 end 3086 if numel(RootFile_1)>=1 3073 3087 if ~(isequal(RootFile_1(1),'/')|isequal(RootFile_1(1),'\')) 3074 3088 RootFile_1(1)=[];%suppress possible / or \ separator … … 3077 3091 end 3078 3092 FileBase_1=fullfile(RootPath_1,RootFile_1); 3079 FileIndices_1=get(handles.FileIndex_1,'String'); 3093 if isequal(get(handles.FileIndex_1,'Visible'),'off') 3094 FileIndices_1=get(handles.FileIndex,'String'); 3095 else 3096 FileIndices_1=get(handles.FileIndex_1,'String'); 3097 end 3080 3098 FileExt_1=get(handles.FileExt_1,'String'); 3081 3099 if isequal(FileExt_1,'"'),FileExt_1=get(handles.FileExt,'String'); end; 3082 3100 FileName_1=[FileName_1 FileIndices_1 FileExt_1]; 3083 3101 3084 %--------------------------------------------------- 3102 %------------------------------------------------------------------------ 3085 3103 % --- Executes on menu selection Fields 3086 3104 function Fields_Callback(hObject, eventdata, handles) 3087 %------------------------------------------------- 3088 3105 %------------------------------------------------------------------------ 3089 3106 list_fields=get(handles.Fields,'String');% list menu fields 3090 3107 index_fields=get(handles.Fields,'Value');% selected string index … … 3112 3129 if isequal(field,'image') 3113 3130 % transform netc type to the corresponding image type 3114 if isequal(NomType,'_i1-i2_j')||isequal(NomType,'_i_j1-j2')|| isequal(NomType,'#_ab')|| isequal(NomType,'_i1-i2')3115 UvData.SubDir=get(handles.SubDir,'String'); %preserve the subdir in memory3116 if ~isempty(UvData.SubDir) && (isequal(UvData.SubDir(1),'/')||isequal(UvData.SubDir(1),'/'))3117 UvData.SubDir(1)=[];3118 end3119 set(handles.SubDir,'String','')3120 set(handles.FileExt,'String','.png');3131 % if isequal(NomType,'_i1-i2_j')||isequal(NomType,'_i_j1-j2')|| isequal(NomType,'#_ab')|| isequal(NomType,'_i1-i2') 3132 % UvData.SubDir=get(handles.SubDir,'String'); %preserve the subdir in memory 3133 % if ~isempty(UvData.SubDir) && (isequal(UvData.SubDir(1),'/')||isequal(UvData.SubDir(1),'/')) 3134 % UvData.SubDir(1)=[]; 3135 % end 3136 % set(handles.SubDir,'String','') 3137 % set(handles.FileExt,'String','.png'); 3121 3138 if isequal(NomType,'_i1-i2_j')||isequal(NomType,'_i_j1-j2') 3122 3139 NomTypeNew='_i_j'; … … 3125 3142 elseif isequal(NomType,'_i1-i2') 3126 3143 NomTypeNew='_i'; 3127 % TODO: look for other types3128 3144 end 3129 end 3130 veltype_handles=[handles.civ1 handles.interp1 handles.filter1 handles.civ2 handles.interp2 handles.filter2]; 3131 set_veltype_display(veltype_handles,0) % unvisible civ buttons 3145 imagename=name_generator(FileBase,str2double(str1),str2double(str_a),'.png',NomTypeNew,1,str2double(str2),str2double(str_b),'') 3146 if ~exist(imagename,'file') 3147 [FileName,PathName] = uigetfile( ... 3148 {'*.png;*.jpg;*.tif;*.avi;*.AVI;*.vol', ' (*.png, .tif, *.avi,*.vol)'; 3149 '*.jpg',' jpeg image files'; ... 3150 '*.png','.png image files'; ... 3151 '*.tif','.tif image files'; ... 3152 '*.avi;*.AVI','.avi movie files'; ... 3153 '*.vol','.volume images (png)'; ... 3154 '*.*', 'All Files (*.*)'}, ... 3155 'Pick an image',imagename) 3156 % display the selected field and related information 3157 imagename=[PathName FileName]; 3158 end 3159 display_file_name(hObject, eventdata, handles,imagename)%display the image 3160 return 3161 % end 3162 % veltype_handles=[handles.civ1 handles.interp1 handles.filter1 handles.civ2 handles.interp2 handles.filter2]; 3163 % set_veltype_display(veltype_handles,0) % unvisible civ buttons 3132 3164 else 3133 3165 ext=get(handles.FileExt,'String'); 3134 3166 if ~isequal(ext,'.nc') %find the new NomType if the previous display was not already a netcdf file 3135 MenuBrowse_Callback(hObject, eventdata, handles) 3167 [FileName,PathName] = uigetfile( ... 3168 {'*.nc', ' (*.nc)'; 3169 '*.nc',' netcdf files'; ... 3170 '*.*', 'All Files (*.*)'}, ... 3171 'Pick a netcdf file',FileBase) 3172 % display the selected field and related information 3173 filename=[PathName FileName]; 3174 display_file_name(hObject, eventdata, handles,filename) 3175 return 3176 % MenuBrowse_Callback(hObject, eventdata, handles) 3136 3177 end 3137 3178 if isequal(field,'vort') || isequal(field,'div') || isequal(field,'strain') … … 3163 3204 set(handles.npx,'Visible','on') 3164 3205 set(handles.npy,'Visible','on') 3165 % set(handles.fix_pair,'Value',0)3166 3206 else 3167 3207 set(handles.npx_title,'Visible','off')% visible npx,pxcm... buttons … … 3169 3209 set(handles.npx,'Visible','off') 3170 3210 set(handles.npy,'Visible','off') 3171 % set(handles.fix_pair,'Value',1)3172 3211 end 3173 3212 setfield(handles);% update the field structure ('civ1'....) … … 3195 3234 3196 3235 %read the rootfile input display 3197 FileExt_prev=get(handles.FileExt_1,'String'); 3236 [FileName,RootPath,FileBase,FileIndices,FileExt_prev]=read_file_boxes_1(handles); 3237 [P,F,str1,str2,str_a,str_b,E,NomType]=name2display(['xxx' get(handles.FileIndex,'String') FileExt_prev]); 3198 3238 if isempty(FileExt_prev)|isequal(FileExt_prev,'') 3199 3239 FileExt_1=get(handles.FileExt,'String'); … … 3239 3279 if isequal(field_1,'image') 3240 3280 % transform netc type to the corresponding image type 3241 set(handles.FileExt_1,'String','.png');3281 % set(handles.FileExt_1,'String','.png'); 3242 3282 if isequal(NomType_1,'_i1-i2_j')|isequal(NomType_1,'_i_j1-j2')| isequal(NomType_1,'#_ab')| isequal(NomType_1,'_i1-i2') 3243 3283 UvData.SubDir_1=get(handles.SubDir_1,'String'); %preserve the subdir in memory 3244 set(handles.SubDir_1,'String','')3284 % set(handles.SubDir_1,'String','') 3245 3285 % set(handles.FileExt_1,'String','.png'); 3246 3286 if isequal(NomType_1,'_i1-i2_j')|isequal(NomType_1,'_i_j1-j2') … … 3252 3292 end 3253 3293 end 3254 veltype_handles=[handles.civ1_1 handles.interp1_1 handles.filter1_1 handles.civ2_1 handles.interp2_1 handles.filter2_1]; 3255 set_veltype_display(veltype_handles,0) % unvisible civ buttons 3294 imagename=name_generator(FileBase,str2double(str1),str2double(str_a),'.png',NomTypeNew,1,str2double(str2),str2double(str_b),''); 3295 if ~exist(imagename,'file') 3296 [FileName,PathName] = uigetfile( ... 3297 {'*.png;*.jpg;*.tif;*.avi;*.AVI;*.vol', ' (*.png, .tif, *.avi,*.vol)'; 3298 '*.jpg',' jpeg image files'; ... 3299 '*.png','.png image files'; ... 3300 '*.tif','.tif image files'; ... 3301 '*.avi;*.AVI','.avi movie files'; ... 3302 '*.vol','.volume images (png)'; ... 3303 '*.*', 'All Files (*.*)'}, ... 3304 'Pick an image',imagename) 3305 % display the selected field and related information 3306 imagename=[PathName FileName]; 3307 end 3308 display_file_name_1(hObject, eventdata, handles,imagename)%display the image 3309 return 3310 % veltype_handles=[handles.civ1_1 handles.interp1_1 handles.filter1_1 handles.civ2_1 handles.interp2_1 handles.filter2_1]; 3311 % set_veltype_display(veltype_handles,0) % unvisible civ buttons 3256 3312 else 3257 3313 set(handles.SubDir_1,'Visible','on') … … 4717 4773 edit_vect_Callback(hObject, eventdata, handles) 4718 4774 set(handles.edit,'BackgroundColor',[0.7 0.7 0.7]) 4719 set(handles.edit_vect,'Value',0)4720 edit_vect_Callback(hObject, eventdata, handles)4721 set(handles.edit,'BackgroundColor',[0.7 0.7 0.7])4722 4775 set(handles.list_object_1,'Value',1) 4723 4776 -
trunk/src/view_field.m
r75 r85 92 92 93 93 [PlotType,PlotParamOut,haxes]= plot_field(Field,handles.axes3)%,PlotParam,KeepLim,PosColorbar) 94 'TEST' 95 if isfield(PlotParamOut,'Vectors') 96 set(handles.VECT_title,'Visible','on') 97 end 98 handles 99 write_plot_param(handles,PlotParamOut);% update the display of the plotting parameters 100 94 101 %------------------------------------------------------------------- 95 102 % --- Outputs from this function are returned to the command menuline. … … 2029 2036 set(handles.slider2,'Min',0); 2030 2037 set(handles.slider2,'Max',1); 2031 % set(handles.min_ title_vec,'String','0')2038 % set(handles.min_C_title_vec,'String','0') 2032 2039 set(handles.max_vec,'String','1') 2033 2040 set(handles.colcode1,'String','0.333') … … 2107 2114 % set(handles.slider2,'Min',minC) 2108 2115 % set(handles.slider2,'Max',maxC) 2109 % set(handles.min_ title_vec,'String',num2str(minC))2116 % set(handles.min_C_title_vec,'String',num2str(minC)) 2110 2117 % set(handles.max_vec,'String',num2str(maxC)) 2111 2118 % if auto … … 2332 2339 %------------------------------------------------------------------- 2333 2340 haxes= handles.axes3; 2334 AxeData=get(haxes,'UserData'); 2341 huvmat=findobj(allchild(0),'tag','uvmat'); 2342 UvData=get(huvmat,'UserData'); 2343 % 2344 % AxeData=get(haxes,'UserData'); 2335 2345 PlotParam=read_plot_param(handles); 2336 [PlotType,PlotParamOut]= plot_field( AxeData,haxes,PlotParam,1);2346 [PlotType,PlotParamOut]= plot_field(UvData.ProjField_2,haxes,PlotParam,1); 2337 2347 write_plot_param(handles,PlotParamOut); %update the auto plot parameters 2338 2348 -
trunk/src/write_plot_param.m
r72 r85 56 56 else 57 57 set_vect_display(handles,'off') 58 set(handles.edit_vect,'Visible','off') 58 if isfield(handles,'edit_vect') 59 set(handles.edit_vect,'Visible','off') 60 set(handles.record,'Visible','off') 61 end 59 62 end 60 63 … … 90 93 set(handles.HideFalse,'Visible',state) 91 94 set(handles.HideWarning,'Visible',state) 92 if isfield(handles,'record')93 set(handles.record,'Visible',state)94 end95 % if isfield(handles,'record') 96 % set(handles.record,'Visible',state) 97 % end 95 98 set(handles.colcode1,'Visible',state) 96 99 set(handles.colcode2,'Visible',state) … … 104 107 set(handles.color_code,'Visible',state) 105 108 set(handles.vec_col_bar,'Visible',state) 106 set(handles.record,'Visible',state)109 % set(handles.record,'Visible',state) 107 110 set(handles.AutoVecColor,'Visible',state) 108 111 set(handles.decimate4,'Visible',state) 109 112 set(handles.min_C_title,'Visible',state) 110 113 set(handles.max_C_title,'Visible',state) 111 set(handles.MenuEditVectors,'Enable',state) 114 if isfield(handles,'MenuEditVectors') 115 set(handles.MenuEditVectors,'Enable',state) 116 end
Note: See TracChangeset
for help on using the changeset viewer.