- Timestamp:
- Mar 16, 2013, 3:46:12 PM (12 years ago)
- Location:
- trunk/src
- Files:
-
- 10 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/browse_data.m
r581 r589 169 169 170 170 171 % ------------------------------------------------------------------------172 function MirrorDir_Callback(hObject, eventdata, handles)173 % ------------------------------------------------------------------------174 MirrorDir=get(handles.MirrorDir,'String');175 [tild,MirrorName]=fileparts(MirrorDir);176 s=xml2struct(fullfile(MirrorDir,[MirrorName '.xml']));177 set(handles.SourceDir,'String',s.SourceDir)178 SourceDir_Callback([],[], handles)171 % %------------------------------------------------------------------------ 172 % function MirrorDir_Callback(hObject, eventdata, handles) 173 % %------------------------------------------------------------------------ 174 % MirrorDir=get(handles.MirrorDir,'String'); 175 % [tild,MirrorName]=fileparts(MirrorDir); 176 % s=xml2struct(fullfile(MirrorDir,[MirrorName '.xml'])); 177 % set(handles.SourceDir,'String',s.SourceDir) 178 % SourceDir_Callback([],[], handles) 179 179 180 180 … … 212 212 function ListExperiments_Callback(hObject, eventdata, handles) 213 213 %------------------------------------------------------------------------ 214 MirrorPath=''; 215 CampaignPath=get(handles.SourceDir,'String'); 214 216 if strcmp(get(handles.MirrorDir,'Visible'),'on') 215 CampaignPath=get(handles.MirrorDir,'String'); 216 else 217 CampaignPath=get(handles.SourceDir,'String'); 217 % CampaignPath=get(handles.MirrorDir,'String'); 218 MirrorPath=get(handles.MirrorDir,'String'); 219 else 220 % CampaignPath=get(handles.SourceDir,'String'); 218 221 end 219 222 % MirrorPath=get(handles.MirrorDir,'String'); … … 228 231 testList=0; 229 232 end 230 scan_experiments(handles,ListExperiments,CampaignPath )233 scan_experiments(handles,ListExperiments,CampaignPath,MirrorPath) 231 234 232 235 … … 242 245 if ~isequal(hdir(ilist).name(1),'.') 243 246 DataSeries=fullfile(CampaignPath,ListExperiments{iexp},hdir(ilist).name); 244 if exist('MirrorPath','var')247 if ~isempty(MirrorPath) 245 248 mirror=fullfile(MirrorPath,ListExperiments{iexp},hdir(ilist).name); 246 249 if ~exist(mirror)% create mirror if needed 247 system(['ln -s ' source' ' mirror])250 system(['ln -s ' DataSeries ' ' mirror]) 248 251 end 249 252 end -
trunk/src/check_files.m
r588 r589 32 32 svn_info.status=[]; 33 33 list_fct={... 34 'xmltree';...%function for editing xml files (toolbox outside uvmat)35 34 'browse_data';...% function for scanning directories in a project/campaign 36 35 'browse_data.fig';...% GUI corresponding to dataview … … 85 84 'read_civdata';... reads new civ data from netcdf files 86 85 'read_field';...% read the fields from files in different formats (netcdf files, images, video) 87 % 'read_get_field';... read the list of selected variables from the GUI get_field (TODO: use read_GUI)88 86 'read_GUI';... %read a GUI and provide the data as a Matlab structure 89 87 'read_image';...%read images or video objects … … 133 131 %% loop on the list of functions in the uvmat package 134 132 icount=0; 133 if ~exist('@xmltree','dir') 134 icount=icount+1; 135 checkmsg{icount}='ERROR installation: toolbox xmltree missing'; 136 end 135 137 datnum=zeros(1,length(list_fct)); 136 138 for i=1:length(list_fct) -
trunk/src/civ.m
r582 r589 527 527 %show the reference image edit box if relevant (not needed for movies or in the absence of time information 528 528 if numel(time)>=2 % if there are at least two time values to define dt 529 if size(time,1)<MaxIndex_i; 530 msgbox_uvmat('WARNING','maximum i index restricted by the timing of the xml file'); 531 elseif size(time,2)<MaxIndex_j 532 msgbox_uvmat('WARNING','maximum j index restricted by the timing of the xml file'); 533 end 529 534 MaxIndex_i=min(size(time,1),MaxIndex_i);%possibly adjust the max index according to time data 530 535 MaxIndex_j=min(size(time,2),MaxIndex_j); -
trunk/src/compile_functions.m
r507 r589 6 6 display('compiling civ_matlab...') 7 7 % commands to compile civ_matlab and eventually other functions 8 if ~exist('bin','dir') 9 [success,errormsg]=mkdir('bin'); 10 if success~=1 11 display(errormsg) 12 end 13 end 8 14 mcc -m -R -nojvm -R -nodisplay civ_matlab.m 9 15 system('mv -f civ_matlab bin/'); -
trunk/src/fullfile_uvmat.m
r372 r589 120 120 % filename=fullfile(RootPath,RootFile); 121 121 % end 122 filename=[filename sep1 i1_str sep2 i2_str sep3 j1_str sep4 j2_str FileExt];123 122 filename=[filename sep1 i1_str sep2 i2_str sep3 j1_str sep4 j2_str]; 123 filename=[regexprep(filename,'_$','') FileExt];%suppress possible '_' at the end of the string and add the extension 124 124 125 125 -
trunk/src/proj_field.m
r586 r589 621 621 flagsel=ones(size(coord_x)); 622 622 end 623 if isequal(ProjMode,'projection') || isequal(ProjMode,'interp_tps')623 if isequal(ProjMode,'projection') %|| isequal(ProjMode,'interp_tps') 624 624 flagsel=flagsel & ((coord_y -yinf(ip))*(xinf(ip+1)-xinf(ip))>(coord_x-xinf(ip))*(yinf(ip+1)-yinf(ip))) ... 625 625 & ((coord_y -ysup(ip))*(xsup(ip+1)-xsup(ip))<(coord_x-xsup(ip))*(ysup(ip+1)-ysup(ip))) ... … … 633 633 for iselect=1:numel(VarIndex)-2*testU 634 634 VarName=FieldData.ListVarName{VarIndex(iselect)}; 635 eval(['ProjVar{iselect}=FieldData.' VarName '(indsel);']);%scalar value635 ProjVar{iselect}=FieldData.(VarName)(indsel);%scalar value 636 636 end 637 637 if testU … … 1185 1185 FieldData=rmfield(FieldData,FieldData.ListVarName{CellInfo{icell}.VarIndex_warnflag}); 1186 1186 end 1187 % interpolate and calculate field on the grid 1187 1188 [VarVal,ListFieldProj,VarAttribute,errormsg]=calc_field_interp([coord_X coord_Y],FieldData,CellInfo{icell}.FieldName,XI,YI); 1189 1188 1190 if isfield(CellInfo{icell},'CheckSub') && CellInfo{icell}.CheckSub && ~isempty(vector_x_proj) 1189 1191 ProjData.(ProjData.ListVarName{vector_x_proj})=ProjData.(ProjData.ListVarName{vector_x_proj})-VarVal{1}; … … 1833 1835 eval(['FieldData.' VarName '=FieldData.' VarName '(indsel);']) 1834 1836 end 1835 eval(['InterpFct=TriScatteredInterp(double(coord_X),double(coord_Y),double(coord_Z),double(FieldData.' VarName '))']) 1836 eval(['ProjData.' VarName '=InterpFct(X,Y,Z);']) 1837 % linear interpolation 1838 InterpFct=TriScatteredInterp(double(coord_X),double(coord_Y),double(coord_Z),double(FieldData.(VarName))); 1839 ProjData.(VarName)=InterpFct(X,Y,Z); 1837 1840 % eval(['varline=reshape(ProjData.' VarName ',1,length(coord_y_proj)*length(coord_x_proj));']) 1838 1841 % FFlag= isnan(varline); %detect undefined values NaN -
trunk/src/set_object.m
r586 r589 288 288 set(handles.num_RangeX_2,'Visible','off') 289 289 set(handles.num_RangeY_1,'Visible','off') 290 if isequal(ProjMode,'interp_lin') 290 if isequal(ProjMode,'interp_lin')|| isequal(ProjMode,'interp_tps') 291 291 set(handles.num_RangeY_2,'Visible','off') 292 292 else -
trunk/src/uvmat.m
r586 r589 917 917 if isfield(XmlData, 'GeometryCalib') && ~isempty(XmlData.GeometryCalib) 918 918 if isfield(XmlData.GeometryCalib,'VolumeScan') && isequal(XmlData.GeometryCalib.VolumeScan,'y') 919 set (handles. num_NbSlice,'String','volume')919 set (handles.slices,'String','volume') 920 920 end 921 921 hgeometry_calib=findobj('tag','geometry_calib'); … … 996 996 end 997 997 if isfield(GeometryCalib,'VolumeScan') && isequal(GeometryCalib.VolumeScan,'y') 998 set(handles.num_NbSlice,' String','volume')998 set(handles.num_NbSlice,'Visible','off') 999 999 else 1000 set(handles.num_NbSlice,'Visible','on') 1000 1001 set(handles.num_NbSlice,'String',num2str(NbSlice)) 1001 1002 end … … 1126 1127 %------------------------------------------------------------------------ 1127 1128 if get(handles.scan_i,'Value')==1 1128 set(handles.scan_i,'BackgroundColor',[1 1 0])1129 % set(handles.scan_i,'BackgroundColor',[1 1 0]) 1129 1130 set(handles.scan_j,'Value',0) 1130 1131 else 1131 set(handles.scan_i,'BackgroundColor',[0.831 0.816 0.784])1132 % set(handles.scan_i,'BackgroundColor',[0.831 0.816 0.784]) 1132 1133 set(handles.scan_j,'Value',1) 1133 1134 end … … 1139 1140 %------------------------------------------------------------------------ 1140 1141 if get(handles.scan_j,'Value')==1 1141 set(handles.scan_j,'BackgroundColor',[1 1 0])1142 % set(handles.scan_j,'BackgroundColor',[1 1 0]) 1142 1143 set(handles.scan_i,'Value',0) 1143 set(handles.scan_i,'BackgroundColor',[0.831 0.816 0.784])1144 % set(handles.scan_i,'BackgroundColor',[0.831 0.816 0.784]) 1144 1145 % NomType=get(handles.NomType,'String'); 1145 1146 % switch NomType … … 1150 1151 % end 1151 1152 else 1152 set(handles.scan_j,'BackgroundColor',[0.831 0.816 0.784])1153 % set(handles.scan_j,'BackgroundColor',[0.831 0.816 0.784]) 1153 1154 set(handles.scan_i,'Value',1) 1154 set(handles.scan_i,'BackgroundColor',[1 1 0])1155 % set(handles.scan_i,'BackgroundColor',[1 1 0]) 1155 1156 set(handles.CheckFixPair,'Visible','off') 1156 1157 end … … 1222 1223 function slices_Callback(hObject, eventdata, handles) 1223 1224 %------------------------------------------------------------------------ 1224 if get(handles.slices,'Value')==11225 set(handles.slices,'BackgroundColor',[1 1 0])1226 set(handles.num_NbSlice,'Visible','on')1227 set(handles.z_text,'Visible','on')1228 set(handles.z_index,'Visible','on')1229 num_NbSlice_Callback(hObject, eventdata, handles)1230 else1231 set(handles.num_NbSlice,'Visible','off')1232 set(handles.slices,'BackgroundColor',[0.7 0.7 0.7])1233 set(handles.z_text,'Visible','off')1234 set(handles.z_index,'Visible','off')1235 set(handles.masklevel,'Value',1)1236 set(handles.masklevel,'String',{'1'})1225 if strcmp(get(handles.slices,'String'),'slices') 1226 if get(handles.slices,'Value')==1 1227 set(handles.num_NbSlice,'Visible','on') 1228 set(handles.z_text,'Visible','on') 1229 set(handles.z_index,'Visible','on') 1230 num_NbSlice_Callback(hObject, eventdata, handles) 1231 else 1232 set(handles.num_NbSlice,'Visible','off') 1233 set(handles.z_text,'Visible','off') 1234 set(handles.z_index,'Visible','off') 1235 set(handles.masklevel,'Value',1) 1236 set(handles.masklevel,'String',{'1'}) 1237 end 1237 1238 end 1238 1239 … … 1240 1241 function num_NbSlice_Callback(hObject, eventdata, handles) 1241 1242 %------------------------------------------------------------------------ 1243 mode=get(handles.slices,'String'); 1242 1244 nb_slice_str=get(handles.num_NbSlice,'String'); 1243 if isequal(nb_slice_str,'volume') 1244 num=stra2num(get(handles.j1,'String')); 1245 last_j=get(handles.last_j,'String'); 1246 nbslice=str2double(last_j{1}); 1245 if strcmp(mode,'volume') 1246 z=stra2num(get(handles.j1,'String')); 1247 1247 else 1248 1248 num=str2double(get(handles.i1,'String')); 1249 1249 nbslice=str2double(get(handles.num_NbSlice,'String')); 1250 end 1251 z=mod(num-1,nbslice)+1; 1250 z=mod(num-1,nbslice)+1; 1251 end 1252 1252 set(handles.z_index,'String',num2str(z)) 1253 1253 for ilist=1:nbslice … … 1322 1322 if mdetect 1323 1323 set(handles.num_NbSlice,'String',Name(i+1:ind_mask-1)); 1324 set(handles.num_NbSlice,'BackgroundColor',[1 1 0])1324 set(handles.num_NbSlice,'BackgroundColor',[1 1 0]) 1325 1325 set(handles.CheckMask,'UserData',Mask); 1326 1326 set(handles.CheckMask,'BackgroundColor',[1 1 0]) … … 2043 2043 end 2044 2044 %update the z position index 2045 nbslice_str=get(handles.num_NbSlice,'String');2046 if isequal(nbslice_str,'volume')%NOT USED2045 mode_slice=get(handles.slices,'String'); 2046 if strcmp(mode_slice,'volume') 2047 2047 z_index=num_j1; 2048 2048 set(handles.z_index,'String',num2str(z_index)) 2049 2049 else 2050 nbslice=str2num( nbslice_str);2050 nbslice=str2num(get(handles.num_NbSlice,'String')); 2051 2051 z_index=mod(num_i1-1,nbslice)+1; 2052 2052 set(handles.z_index,'String',num2str(z_index)) … … 2884 2884 %------------------------------------------------------------------- 2885 2885 if get(handles.CheckFixAspectRatio,'Value') 2886 set(handles.CheckFixAspectRatio,'BackgroundColor',[1 1 0])2886 % set(handles.CheckFixAspectRatio,'BackgroundColor',[1 1 0]) 2887 2887 update_plot(handles); 2888 2888 else 2889 set(handles.CheckFixAspectRatio,'BackgroundColor',[0.7 0.7 0.7])2889 % set(handles.CheckFixAspectRatio,'BackgroundColor',[0.7 0.7 0.7]) 2890 2890 update_plot(handles); 2891 2891 end … … 2895 2895 %------------------------------------------------------------------- 2896 2896 set(handles.CheckFixAspectRatio,'Value',1)% select the fixed aspect ratio button 2897 set(handles.CheckFixAspectRatio,'BackgroundColor',[1 1 0])% mark in yellow2897 % set(handles.CheckFixAspectRatio,'BackgroundColor',[1 1 0])% mark in yellow 2898 2898 update_plot(handles); 2899 2899 %------------------------------------------------------------------- … … 5165 5165 % --- Executes on button press in CheckColorBar. 5166 5166 function CheckColorBar_Callback(hObject, eventdata, handles) 5167 -
trunk/src/write_plot_param.m
r511 r589 18 18 if Coordinates.CheckFixAspectRatio 19 19 set(handles.CheckFixAspectRatio,'Value',1) 20 set(handles.CheckFixAspectRatio,'BackgroundColor',[1 1 0])21 20 else 22 21 set(handles.CheckFixAspectRatio,'Value',0) 23 set(handles.CheckFixAspectRatio,'BackgroundColor',[0.7 0.7 0.7])22 24 23 end 25 24 end
Note: See TracChangeset
for help on using the changeset viewer.