Changeset 223
- Timestamp:
- Mar 17, 2011, 8:21:26 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/series/relabel_i_j.m
r216 r223 1 1 2 % relabel_i_j: relabel an image series with two indices, and correct errors from the RDvision transfer program 2 3 %---------------------------------------------------------------------- … … 14 15 %% PARAMETERS (for RDvision system) 15 16 display('RDvision system') 16 first_label=0 %image numbers start from 017 first_label=0; %image numbers start from 0 17 18 %errorfactor=1 %correct a factor of 2 in NbDk+1 18 19 … … 25 26 end 26 27 basename=fullfile(RootPath{1},RootFile{1}); 27 [XmlData,warntext]=imadoc2struct([basename '.xml']) % read the xml file appended to the present function (containing bug corrections)28 [XmlData,warntext]=imadoc2struct([basename '.xml']);% read the xml file appended to the present function (containing bug corrections) 28 29 if ~isempty(warntext) 29 30 msgbox_uvmat('ERROR',warntext)%error message for xml file reading … … 47 48 return 48 49 end 49 50 answer=msgbox_uvmat('CONFIRMATION',[num2str(nbfield1) ' bursts containing ' num2str(nbfield2) ' images each'])%error message for directory creation 51 52 %% apply the image rescaling function 'level' (avoid bright particles) 53 % answer=msgbox_uvmat('INPUT_Y-N','apply image rescaling function levels.m'); 54 % test_level=isequal(answer,'Yes'); 50 answer=msgbox_uvmat('CONFIRMATION',[num2str(nbfield1) ' bursts containing ' num2str(nbfield2) ' images each']);%error message for directory creation 55 51 56 52 %% copy and adapt the xml file … … 73 69 ImageName=name_generator(basename,1,1,'.png','_i_j'); 74 70 [pth,ImageName]=fileparts(ImageName); 75 ImageName=[ImageName '.png'] 71 ImageName=[ImageName '.png']; 76 72 if isempty(uid_ImageName) 77 73 [t,uid_ImageName]=add(t,uid_Heading,'element','ImageName'); … … 86 82 %%%% correction RDvision %%%% 87 83 uid_NbDtj=find(t,'ImaDoc/Camera/BurstTiming/NbDtj'); 88 t=set(t,uid_NbDtj,'value',num2str(XmlData.NbDtj)); 84 uid_value=children(t,uid_NbDtj); 85 if ~isempty(uid_value) 86 t=set(t,uid_value(1),'value',num2str(XmlData.NbDtj)); 87 end 89 88 uid_NbDtk=find(t,'ImaDoc/Camera/BurstTiming/NbDtk'); 90 t=set(t,uid_NbDtk,'value',num2str(XmlData.NbDtk)); 89 uid_value=children(t,uid_NbDtk); 90 if ~isempty(uid_value) 91 t=set(t,uid_value(1),'value',num2str(XmlData.NbDtk)); 92 end 91 93 %%% 92 94 … … 185 187 186 188 function [s,errormsg]=imadoc2struct(ImaDoc,option) 189 187 190 %% default input and output 188 191 if ~exist('option','var') … … 273 276 NbDtk=get_value(subt,'/BurstTiming/NbDtk',1); 274 277 %%%% correction RDvision %%%% 275 NbDtk=-1+(NbDtk+1)/(NbDti+1) 278 if ~isequal(NbDtk,1) 279 NbDtk=-1+(NbDtk+1)/(NbDti+1); 280 end 276 281 s.NbDtk=NbDtk; 277 282 %%%%%
Note: See TracChangeset
for help on using the changeset viewer.