Changeset 1120 for trunk/src/uvmat.m


Ignore:
Timestamp:
Dec 15, 2022, 6:21:53 PM (17 months ago)
Author:
sommeria
Message:

various corrections

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/uvmat.m

    r1118 r1120  
    12091209UvData=get(handles.uvmat,'UserData');%read UvData properties stored on the uvmat interface
    12101210Slice=[];
     1211Check_slice=0;
    12111212if isfield(UvData,'XmlData')
     1213    if isfield(UvData.XmlData{1},'GeometryCalib') && strcmp(UvData.XmlData{1}.GeometryCalib.CalibrationType(1:3),'3D_')
     1214        Check_slice=1;
     1215    end
    12121216    if isfield(UvData.XmlData{1},'GeometryCalib')&& isfield(UvData.XmlData{1}.GeometryCalib,'SliceCoord')
    12131217        Slice=UvData.XmlData{1}.GeometryCalib;%old convention < 2022
     
    12151219        Slice=UvData.XmlData{1}.Slice;% new convention ( 2022)
    12161220    end
     1221end
     1222if ~Check_slice
     1223    msgbox_uvmat('ERROR','3D calibration not available, use Tools/geometric calibration with 3D option');
     1224    return
    12171225end
    12181226% default input
     
    12951303
    12961304uicontrol('Style','edit','Units','normalized', 'Position', [3*ii+ww 0.95-5*ii-4.2*hh ww hh],'tag','num_SliceCoord_1','BackgroundColor',[1 1 1],...
    1297     'String',num2str(Slice.SliceCoord(1)),'FontUnits','points','FontSize',12,'FontWeight','bold','TooltipString','''num_SliceCoord_1'':x position of the tild origin');%edit box
     1305    'String',num2str(Slice.SliceCoord(1,1)),'FontUnits','points','FontSize',12,'FontWeight','bold','TooltipString','''num_SliceCoord_1'':x position of the tild origin');%edit box
    12981306uicontrol('Style','edit','Units','normalized', 'Position', [3*ii+ww 0.95-6*ii-5.2*hh ww hh],'tag','num_SliceCoord_2','BackgroundColor',[1 1 1],...
    1299     'String',num2str(Slice.SliceCoord(2)),'FontUnits','points','FontSize',12,'FontWeight','bold','TooltipString','''num_SliceCoord_2'':y position of the tild origin');%edit box
     1307    'String',num2str(Slice.SliceCoord(1,2)),'FontUnits','points','FontSize',12,'FontWeight','bold','TooltipString','''num_SliceCoord_2'':y position of the tild origin');%edit box
    13001308
    13011309uicontrol('Style','text','Units','normalized', 'Position', [ii 0.95-5*ii-4*hh 1.3*ww hh/2],'BackgroundColor',BackgroundColor,'Tag','Angle_title_1',...
     
    13531361[RootPath,SubDir,RootFile,tild,tild,tild,tild,FileExt]=fileparts_uvmat(FileName);
    13541362XmlFile=find_imadoc(RootPath,SubDir,RootFile,FileExt);%find name of the relevant xml file
    1355 % [s,errormsg]=imadoc2struct(XmlFile,'Slice');%read the xml file
    1356 % if~isempty(errormsg)
    1357 %     msgbox_uvmat('ERROR',errormsg)
    1358 %     return
    1359 % end
    1360 % Slice=s.Slice;% get thegeometric calibration data
     1363if isempty(XmlFile)
     1364    msgbox_uvmat('ERROR','an xml file with calibration parameters must be first created, use Tools/geometric calibration');
     1365    return
     1366end
     1367[s,RootTag,errormsg]=xml2struct(XmlFile);
    13611368
    13621369%% read the content of the GUI set_slice
     
    13701377    Z_plane=linspace(SliceData.Z(1),SliceData.Z(2),SliceData.NbSlice);
    13711378else
    1372     set(hZ,'String',num2str(Z_plane))% restitute the display qfter reqding by read_GUI
     1379    set(hZ,'String',num2str(Z_plane))% restitute the display after reading by read_GUI
    13731380end
    13741381Slice.SliceCoord=Z_plane'*[0 0 1];
     
    33153322        elseif ref_i_1+1>size(UvData.i1_series{2},3)&&~isempty(InputFile.NomType_1)
    33163323            errormsg='maximum i index reached for the second series (reload the input file to update the index bound)';
    3317         elseif ref_j_1+1>size(UvData.i1_series{2},2)&&~isempty(InputFile.NomType_1)
    3318             errormsg='maximum j index reached for the second series(reload the input file to update the index bound)';
     3324        %elseif ref_j_1+1>size(UvData.i1_series{2},2)&&~isempty(InputFile.NomType_1)
     3325         %   errormsg='maximum j index reached for the second series(reload the input file to update the index bound)';
    33193326        end
    33203327        if ~isempty(errormsg),return,end
Note: See TracChangeset for help on using the changeset viewer.