Changeset 498
- Timestamp:
- Jul 23, 2012, 8:44:33 PM (12 years ago)
- Location:
- trunk/src
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/check_files.m
r497 r498 54 54 'fill_GUI';...% fill a GUI with a set of parameters from a Matlab structure 55 55 'filter_tps';...% find the thin plate spline coefficients for interpolation-smoothing 56 'find_field_indices';...% group the variables of a nc-formated Matlab structure into 'fields' with common dimensions56 'find_field_indices';...% group the variables of a 'field object' into 'field cells' and specify their structure 57 57 'find_file_series';...%check the content of an input file and find the corresponding file series 58 'find_imadoc';...% find the ImaDoc xml file associated with a given input file 58 59 'fullfile_uvmat';...%creates a file name from a root name and indices. 59 60 'geometry_calib';...%performs geometric calibration from a set of reference points … … 84 85 'read_civxdata';...reads civx data from netcdf files 85 86 'read_civdata';... reads new civ data from netcdf files 86 'read_ image';... read images or video objects87 'read_field';...% read the fields from files in different formats (netcdf files, images, video) 87 88 'read_get_field';... read the list of selected variables from the GUI get_field (TODO: use read_GUI) 88 89 'read_GUI';... %read a GUI and provide the data as a Matlab structure 89 'read_image';...%read .civ files (obsolete, but can be adapted to other text documentation files)90 'read_image';...%read images or video objects 90 91 'read_multimadoc';... %read a set of Imadoc files and compare their timing of different file series 91 92 'read_xls';...%read excel files containing the list of the experiments -
trunk/src/civ.m
r495 r498 1318 1318 Param.Civ2.ImageHeight=ImageInfoA_civ2.Height; 1319 1319 if strcmp(NomTypeIma,'*') 1320 Param.Civ2.FrameIndexA=i1_civ2(ifile ,j);1321 Param.Civ2.FrameIndexB=i2_civ2(ifile ,j);1320 Param.Civ2.FrameIndexA=i1_civ2(ifile); 1321 Param.Civ2.FrameIndexB=i2_civ2(ifile); 1322 1322 else% case of movies indexed with i, the frame index is then in j 1323 Param.Civ2.FrameIndexA=j1_civ2( ifile,j);1324 Param.Civ2.FrameIndexB=j2_civ2( ifile,j);1323 Param.Civ2.FrameIndexA=j1_civ2(j); 1324 Param.Civ2.FrameIndexB=j2_civ2(j); 1325 1325 end 1326 1326 end … … 1551 1551 fprintf(fid,['#!/bin/bash \n' ... 1552 1552 '/etc/sysprofile \n'... 1553 'matlab -nodisplay -nosplash -nojvm <<END_MATLAB \n'...1553 'matlab -nodisplay -nosplash -nojvm -logfile <<END_MATLAB \n'... 1554 1554 'addpath(''' path_civ ''');\n']); 1555 1555 for p=1:length(batch_file_list) -
trunk/src/geometry_calib.m
r494 r498 113 113 set(handles.ListCoord,'String',{'......'}) 114 114 if exist(inputfile,'file') 115 Heading=loadfile(handles,inputfile);% load the point coordinates existing inthe xml file115 Heading=loadfile(handles,inputfile);% load data from the xml file 116 116 if isfield(Heading,'Campaign')&& ischar(Heading.Campaign) 117 117 struct.Campaign=Heading.Campaign; … … 274 274 GeometryCalib.RefractionIndex=str2double(answer{4}); 275 275 end 276 UserData=get(handles.geometry_calib,'UserData'); 277 if isfield(UserData,'XmlInputFile')&&~strcmp(UserData.XmlInputFile, outputfile)&&~exist(outputfile,'file') 278 [success,message]=copyfile(UserData.XmlInputFile,outputfile);%copy the old xml file to a new one with the new convention 279 end 276 280 errormsg=update_imadoc(GeometryCalib,outputfile);% introduce the calibration data in the xml file 277 281 if ~strcmp(errormsg,'') … … 290 294 set(hhuvmat.CheckFixLimits,'Value',0)% put FixedLimits option to 'off' 291 295 set(hhuvmat.CheckFixLimits,'BackgroundColor',[0.7 0.7 0.7]) 292 UserData=get(handles.geometry_calib,'UserData');296 293 297 UserData.XmlInputFile=outputfile;%save the current xml file name 294 298 set(handles.geometry_calib,'UserData',UserData) … … 1370 1374 GeometryCalib=s.GeometryCalib; 1371 1375 fx=1;fy=1;Cx=0;Cy=0;kc=0; %default 1372 % Tabchar={};1373 1376 CoordCell={}; 1374 % kc=0;%default1375 % f1=1000;1376 % f2=1000;1377 % hhuvmat=guidata(findobj(allchild(0),'Name','uvmat'));1378 % Cx=str2num(get(hhuvmat.num_Npx,'String'))/2;1379 % Cy=str2num(get(hhuvmat.num_Npy,'String'))/2;1380 1377 Tabchar={};%default 1381 1378 val_cal=1;%default -
trunk/src/read_civxdata.m
r472 r498 156 156 Field.Y=Field.Y*Field.pixcmy; 157 157 end 158 if ~isequal(Field. dt,0)159 Field.U=Field.U*Field. dt;%translate in px displacement160 Field.V=Field.V*Field. dt;158 if ~isequal(Field.Dt,0) 159 Field.U=Field.U*Field.Dt;%translate in px displacement 160 Field.V=Field.V*Field.Dt; 161 161 if isfield(Field,'DjUi') 162 Field.DjUi(:,1,1)=Field. dt*Field.DjUi(:,1,1);163 Field.DjUi(:,2,2)=Field. dt*Field.DjUi(:,2,2);164 Field.DjUi(:,1,2)=(Field.pixcmy/Field.pixcmx)*Field. dt*Field.DjUi(:,1,2);165 Field.DjUi(:,2,1)=(Field.pixcmx/Field.pixcmy)*Field. dt*Field.DjUi(:,2,1);162 Field.DjUi(:,1,1)=Field.Dt*Field.DjUi(:,1,1); 163 Field.DjUi(:,2,2)=Field.Dt*Field.DjUi(:,2,2); 164 Field.DjUi(:,1,2)=(Field.pixcmy/Field.pixcmx)*Field.Dt*Field.DjUi(:,1,2); 165 Field.DjUi(:,2,1)=(Field.pixcmx/Field.pixcmy)*Field.Dt*Field.DjUi(:,2,1); 166 166 end 167 167 end -
trunk/src/read_get_field.m
r434 r498 179 179 end 180 180 test_xdimvar=1; 181 SubVarAttribute{nbvar}.Role='dimvar';% dimension variable181 % SubVarAttribute{nbvar}.Role='dimvar';% dimension variable 182 182 else 183 183 SubVarAttribute{nbvar}.Role='coord_x';%abcissa with unstructured coordinates … … 214 214 end 215 215 test_ydimvar=1; 216 SubVarAttribute{nbvar}.Role='dimvar';% dimension variable216 % SubVarAttribute{nbvar}.Role='dimvar';% dimension variable 217 217 else 218 218 SubVarAttribute{nbvar}.Role='coord_y';%abcissa with unstructured coordinates … … 247 247 end 248 248 test_zdimvar=1; 249 SubVarAttribute{nbvar}.Role='dimvar';% dimension variable249 % SubVarAttribute{nbvar}.Role='dimvar';% dimension variable 250 250 else 251 251 SubVarAttribute{nbvar}.Role='coord_z';%abcissa with unstructured coordinates … … 331 331 end 332 332 test_vec_x_dimvar=1; 333 SubVarAttribute{nbvar}.Role='dimvar';% dimension variable333 % SubVarAttribute{nbvar}.Role='dimvar';% dimension variable 334 334 else 335 335 SubVarAttribute{nbvar}.Role='coord_x';%abcissa with unstructured coordinates … … 364 364 end 365 365 test_vec_y_dimvar=1; 366 SubVarAttribute{nbvar}.Role='dimvar';% dimension variable366 % SubVarAttribute{nbvar}.Role='dimvar';% dimension variable 367 367 else 368 368 SubVarAttribute{nbvar}.Role='coord_y';%abcissa with unstructured coordinates … … 398 398 end 399 399 % test_vec_z_dimvar=1; 400 SubVarAttribute{nbvar}.Role='dimvar';% dimension variable400 % SubVarAttribute{nbvar}.Role='dimvar';% dimension variable 401 401 else 402 402 SubVarAttribute{nbvar}.Role='coord_z';%abcissa with unstructured coordinates -
trunk/src/update_imadoc.m
r414 r498 10 10 errormsg=''; 11 11 testappend=0; 12 if exist(outputfile,'file');%=1 if the output file already exists, 0 else 12 %% backup the output file if it already exist, and read it 13 if exist(outputfile,'file');%=1 if the output file already exists, 0 else 13 14 testappend=1; 14 t=xmltree(outputfile); %read the file15 15 backupfile=outputfile; 16 16 testexist=2; 17 17 while testexist==2 18 backupfile=[backupfile '~'];19 testexist=exist(backupfile,'file');18 backupfile=[backupfile '~']; 19 testexist=exist(backupfile,'file'); 20 20 end 21 21 [success,message]=copyfile(outputfile,backupfile);%make backup 22 if success==0 23 errormsg=message; 22 if success~=1 23 errormsg=['errror in xml file backup: ' message]; 24 return 24 25 end 25 uid=find(t,'ImaDoc'); 26 if ~isequal(uid,1) 27 return 28 end 29 %if the xml file is ImaDoc 30 uid_calib=find(t,'ImaDoc/GeometryCalib'); 31 if isempty(uid_calib) %if GeometryCalib does not already exists, create it 32 [t,uid_calib]=add(t,1,'element','GeometryCalib'); 33 else %if GeometryCalib already exists, delete its content 34 if isequal(success,1) 35 delete(outputfile) 36 else 37 return 26 t=xmltree(outputfile); %read the file 27 title=get(t,1,'name'); 28 if strcmp(title,'ImaDoc')) 29 testappend=1; 30 %if the xml file is ImaDoc 31 uid_calib=find(t,'ImaDoc/GeometryCalib'); 32 if isempty(uid_calib) %if GeometryCalib does not already exists, create it 33 [t,uid_calib]=add(t,1,'element','GeometryCalib'); 34 else %if GeometryCalib already exists, delete its content 35 uid_child=children(t,uid_calib); 36 t=delete(t,uid_child); 38 37 end 39 uid_child=children(t,uid_calib);40 t=delete(t,uid_child);41 38 end 42 39 end 43 %create a new xml file 40 41 %% create a new xml file 44 42 if ~testappend 45 43 t=xmltree; … … 69 67 [t,uid_calib]=add(t,1,'element','GeometryCalib'); 70 68 end 69 70 %% save the output file 71 71 t=struct2xml(GeometryCalib,t,uid_calib); 72 72 save(t,outputfile); -
trunk/src/uvmat.m
r497 r498 2743 2743 end 2744 2744 end 2745 if isequal(PlotType,'none')2746 hget_field=findobj(allchild(0),'name','get_field');2747 if isempty(hget_field)2748 get_field(FileName)% the projected field cannot be automatically plotted: use get_field to specify the variablesdelete(hget_field)2749 end2750 errormsg='The field defined by get_field cannot be plotted';2751 return2752 end2745 % if isequal(PlotType,'none') 2746 % hget_field=findobj(allchild(0),'name','get_field'); 2747 % if isempty(hget_field) 2748 % get_field(FileName)% the projected field cannot be automatically plotted: use get_field to specify the variablesdelete(hget_field) 2749 % end 2750 % errormsg='The field defined by get_field cannot be plotted'; 2751 % return 2752 % end 2753 2753 end 2754 2754 end
Note: See TracChangeset
for help on using the changeset viewer.