Changeset 909 for trunk/src


Ignore:
Timestamp:
Jun 9, 2015, 7:51:29 PM (9 years ago)
Author:
sommeria
Message:

various bug repair

Location:
trunk/src
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/series.m

    r908 r909  
    269269    %% fill the list of file series
    270270    InputTable=[{Param.InputFile.RootPath},{Param.InputFile.SubDir},{Param.InputFile.RootFile},{Param.InputFile.NomType},{Param.InputFile.FileExt}];
     271    if isempty(find(cellfun('isempty',InputTable)==0));% if there is no input file, do not introduce input info
     272        set(handles.REFRESH,'BackgroundColor',[1 0 1])% set REFRESH button to magenta color to indicate that input refresh is needed
     273        return
     274    end
    271275    TimeTable=[{Param.InputFile.TimeName},{[]},{[]},{[]},{[]}];
    272276    if isfield(Param.InputFile,'RootPath_1')
  • trunk/src/series/extract_rdvision.m

    r908 r909  
    236236    [npi,npj]=size(XmlData.Time);
    237237    if ~isequal(SeqData.nb_frames,(npi-1)*(npj-1))
    238         disp_uvmat('ERRROR','inconsistent number of images with respect to the xml file',checkrun);
     238        disp_uvmat('ERRROR',['inconsistent number of images ' num2str(SeqData.nb_frames) ' with respect to the xml file: ' num2str((npi-1)*(npj-1))] ,checkrun);
    239239        return
    240240    end
     
    277277        disp_uvmat('WARNING',['timestamps exceeds xml time by' num2str(max(time_diff_max))],checkrun)
    278278        checkpreserve=1;
    279     end
    280     if min(time_diff_min)<-0.005
     279    elseif min(time_diff_min)<-0.005
    281280        disp_uvmat('WARNING',['timestamps is lower than xml time by' num2str(min(time_diff_min))],checkrun)
    282281        checkpreserve=1;
     282    else
     283        disp_uvmat('CONFIRMATION','time from xml file correct within better than 5 ms',checkrun)
    283284    end
    284285    if checkpreserve
  • trunk/src/uvmat.m

    r908 r909  
    12061206function set_slice_APPLY_Callback(hObject,eventdata)
    12071207%------------------------------------------------------------------------   
     1208set(hObject,'BackgroundColor',[1 1 0]);% paint button in yellow to indicate action
     1209drawnow
    12081210
    12091211%% get the uvmat GUI data and read the current xml file
     
    12501252
    12511253%% display image with new calibration in the currently opened uvmat interface
    1252 set(hhuvmat.CheckFixLimits,'Value',0)% put FixedLimits option to 'off' to plot the whole image
     1254%set(hhuvmat.CheckFixLimits,'Value',0)% put FixedLimits option to 'off' to plot the whole image
    12531255uvmat('InputFileREFRESH_Callback',huvmat,[],hhuvmat); %file input with xml reading  in uvmat, show the image in phys coordinates
     1256set(hObject,'BackgroundColor',[1 0 0]);% paint button back to red
    12541257
    12551258%------------------------------------------------------------------------
     
    12571260function set_slice_REPLICATE_Callback(hObject,eventdata)
    12581261%------------------------------------------------------------------------
     1262set(hObject,'BackgroundColor',[1 1 0])
     1263drawnow
    12591264
    12601265%% read the GUI set_slice
     
    12641269huvmat=findobj(allchild(0),'Tag','uvmat');
    12651270hhuvmat=guidata(huvmat);
    1266 [RootPath,SubDir,RootFile,FileIndex,FileExt]=read_file_boxes(hhuvmat);
    1267 
    1268 %% open the GUI browse_data
    1269 % answer=msgbox_uvmat('INPUT_TXT','Campaign to calibrate with slice position?',fileparts(RootPath));
    1270 % if strcmp(answer,'Cancel')
    1271 %     return
    1272 % end
    1273 OutPutDir=uigetfile_uvmat('Campaign to calibrate with slice position?',fileparts(RootPath),'uigetdir');
     1271RootPath=read_file_boxes(hhuvmat);
     1272
     1273OutPutDir=uigetfile_uvmat('choosean image folder to calibrate with slice position?',fileparts(RootPath),'uigetdir');
    12741274OutPut=browse_data(OutPutDir);
    12751275nbcalib=0;
     
    12861286    GeometryCalib=s.GeometryCalib;
    12871287    GeometryCalib.NbSlice=SliceData.NbSlice;
    1288     GeometryCalib.VolumeScan=SliceData.CheckVolumeScan;
     1288    GeometryCalib.CheckVolumeScan=SliceData.CheckVolumeScan;
    12891289    Z_plane=linspace(SliceData.Z(1),SliceData.Z(2),SliceData.NbSlice);
    12901290    GeometryCalib.SliceCoord=Z_plane'*[0 0 1];
    12911291    GeometryCalib.SliceAngle=zeros(GeometryCalib.NbSlice,3);
    1292     GeometryCalib.SliceAngle(:,1)=SliceData.SliceAngle(1)*ones(GeometryCalib.NbSlice,1);%rotation around x axis (to generalise)
    1293     GeometryCalib.SliceAngle(:,2)=SliceData.SliceAngle(2)*ones(GeometryCalib.NbSlice,1);%rotation around y axis (to generalise)
     1292    Angle_1=linspace(SliceData.SliceAngle_1(1),SliceData.SliceAngle_1(2),SliceData.NbSlice);
     1293    Angle_2=linspace(SliceData.SliceAngle_2(1),SliceData.SliceAngle_2(2),SliceData.NbSlice);
     1294    GeometryCalib.SliceAngle(:,1)=Angle_1';%rotation around x axis (to generalise)
     1295    GeometryCalib.SliceAngle(:,2)=Angle_2';%rotation around y axis (to generalise)
    12941296    GeometryCalib.SliceAngle(:,3)=0;
    12951297    if SliceData.CheckRefraction
    12961298        GeometryCalib.InterfaceCoord=[0 0 SliceData.H];
    12971299        GeometryCalib.RefractionIndex=SliceData.RefractionIndex;
     1300    elseif isfield(GeometryCalib,'RefractionIndex')
     1301        GeometryCalib=rmfield(GeometryCalib,'RefractionIndex');
     1302        GeometryCalib=rmfield(GeometryCalib,'InterfaceCoord');
    12981303    end
    12991304   
     
    13071312    end
    13081313end
     1314set(hObject,'BackgroundColor',[1 0 0])
    13091315msgbox_uvmat('CONFIMATION',[SubDirBase ' calibrated with slice positions for ' num2str(nbcalib) ' experiments']);
     1316
    13101317
    13111318%------------------------------------------------------------------------
Note: See TracChangeset for help on using the changeset viewer.