Ignore:
Timestamp:
Mar 15, 2016, 12:29:15 PM (8 years ago)
Author:
sommeria
Message:

writting access improved

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/series/extract_rdvision.m

    r931 r932  
    451451uid_Dtj=find(t,'ImaDoc/Camera/BurstTiming/Dtj');
    452452uid_content=get(t,uid_Dtj,'contents');
    453 Dtj=str2num(get(t,uid_content,'value'));
    454 nbfield2=numel(Dtj)+1;
    455 timestamp=(reshape(timestamp,nbfield2,[]))';
    456 diff_Dtj=diff(timestamp(1,:))-Dtj;
    457 if max(abs(diff_Dtj))>min(Dtj)/1000
    458     disp(['Dtj from xml file differs from time stamp by ' num2str(max(abs(diff_Dtj))) ', '])%'
     453Dtjstring=get(t,uid_content,'value');
     454if isempty(Dtjstring)
     455    timestamp=timestamp';
     456    nbfield2=1;
    459457else
    460     disp('Dtj OK');
    461 end
    462 
     458    Dtj=str2num(get(t,uid_content,'value'));
     459    nbfield2=numel(Dtj)+1;
     460    timestamp=(reshape(timestamp,nbfield2,[]))';
     461    diff_Dtj=diff(timestamp(1,:))-Dtj;
     462    if max(abs(diff_Dtj))>min(Dtj)/1000
     463        disp(['Dtj from xml file differs from time stamp by ' num2str(max(abs(diff_Dtj))) ', '])%'
     464    else
     465        disp('Dtj OK');
     466    end
     467end
    463468%% correct NbDti
    464469NbDti=size(timestamp,1); %default for series or burst
     
    503508
    504509save(t,newxml)
    505 
    506 
    507 
    508 
     510       [success,msg] = fileattrib(newxml,'+w','g');% allow writing access for the group of users 
     511        if success==0
     512            msgbox_uvmat('WARNING',{['unable to set group write access to ' newxml ':']; msg1});%error message for directory creation
     513        end
     514
     515
     516
Note: See TracChangeset for help on using the changeset viewer.