Changeset 909 for trunk/src/uvmat.m


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

various bug repair

File:
1 edited

Legend:

Unmodified
Added
Removed
  • 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.