Changeset 1189


Ignore:
Timestamp:
Dec 13, 2025, 10:40:41 PM (15 hours ago)
Author:
sommeria
Message:

introduced creator of xml for PCO multitif

Location:
trunk/src
Files:
1 added
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/@xmltree/xmltree.m

    r1095 r1189  
    3737        elseif ischar(varargin{1})
    3838            % Input argument is an XML string
    39             if (~exist(varargin{1},'file') && ...
     39            if (exist(varargin{1},'file')~=2 && ...
    4040                    ~isempty(xml_findstr(varargin{1},'<',1,1)))
    4141                tree.tree = xml_parser(varargin{1});
  • trunk/src/read_field.m

    r1184 r1189  
    5757ParamOut=ParamIn;%default
    5858errormsg='';
    59 if isempty(regexp(FileName,'^http://', 'once'))&& ~exist(FileName,'file')
     59if isempty(regexp(FileName,'^http://', 'once'))&& exist(FileName,'file')~=2
    6060    errormsg='input file does not exist';
    6161    return
  • trunk/src/series.m

    r1188 r1189  
    345345    Param.j1_series=Param.HiddenData.j1_series{1};
    346346    Param.j2_series=Param.HiddenData.j2_series{1};
     347    Param.FileInfo=Param.HiddenData.FileInfo{1};
     348    Param.Relabel=[];%default
    347349    update_rootinfo(handles,Param,Param.HiddenData.MovieObject{1},1)% update the data for the first input line
    348350    if isfield(Param,'FileName_1')% if there is a second input line from uvmat
     
    354356        Param.j1_series=Param.HiddenData.j1_series{2};
    355357        Param.j2_series=Param.HiddenData.j2_series{2};
     358        Param.FileInfo=Param.HiddenData.FileInfo{2};
    356359        update_rootinfo(handles,Param,Param.HiddenData.MovieObject{2},2)% update the data for the second input line
    357360    end
     
    399402
    400403%delete the bowser if detected
    401 hh=findobj(allchild(0),'tag','browser');fileinput
     404hh=findobj(allchild(0),'tag','browser');
    402405if ~isempty(hh)
    403406    delete(hh)
     
    608611        if ~isempty(XmlFileName)
    609612            XmlData=read_imadoc(XmlFileName);
    610             if isfield(XmlData,'FileSeries')
     613            if ~isempty(XmlData.FileSeries)
    611614                set(handles.Relabel,'Visible','on')
    612615                answer='Yes';
     
    10341037        MinIndex_j=0;
    10351038    end
    1036     if isfield(Param.FileInfo,'Software')&&~isempty(Param.FileInfo.Software) && ~isempty(regexp(Param.FileInfo.Software,'^pco.camware', 'once'))
     1039    if isfield(Param,'FileInfo') && isfield(Param.FileInfo,'Software')&&~isempty(Param.FileInfo.Software) && ~isempty(regexp(Param.FileInfo.Software,'^pco.camware', 'once'))
    10371040        MinIndex_i=0;
    10381041    end
     
    11241127%     end
    11251128
    1126 if ~isempty(Param.FileInfo) && strcmp(Param.FileInfo.FileType,'rdvision')
     1129if isfield(Param,'FileInfo') && ~isempty(Param.FileInfo) && strcmp(Param.FileInfo.FileType,'rdvision')
    11271130    set(handles.OutputSubDir,'String','/im')
    11281131end
     
    41654168function Relabel_Callback(hObject, eventdata, handles)
    41664169CheckRelabel=get(hObject,'Value');
     4170if CheckRelabel
     4171    InputTable=get(handles.InputTable,'Data');%read the table of input file series
     4172    XmlFileName=find_imadoc(InputTable{1,1},InputTable{1,2});
     4173    if ~isempty(XmlFileName)
     4174        XmlData=read_imadoc(XmlFileName);
     4175        if isempty(XmlData.FileSeries)
     4176            browse_data(fullfile(InputTable{1,1},InputTable{1,2}))
     4177        else
     4178            hbrowse=findobj(allchild(0),'Tag','browse_data');
     4179            if ~isempty(hbrowse)
     4180                delete(hbrowse)
     4181            end
     4182        end
     4183    end
     4184end
    41674185check_input_file_series(handles,CheckRelabel)
    4168  ActionInput_Callback([],[], handles)
     4186ActionInput_Callback([],[], handles)
    41694187% if get(handles.Relabel,'Value')
    41704188%             NomType='*';
  • trunk/src/set_param_input.m

    r1157 r1189  
    88
    99
    10 function [ParamOut,errormsg] = set_param_input(ListParam,DefaultValue,ParamIn,Comment)
     10function [ParamOut,errormsg] = set_param_input(ListParam,DefaultValue,ParamIn,Title)
    1111ParamOut=[];
    1212errormsg=[];
    1313NbParam=numel(ListParam);
    1414if numel(DefaultValue)~=NbParam
    15     errorsmsg='ERROR in set_param_input: the list of default values must have the same size as the list of parameters';
     15    errormsg='ERROR in set_param_input: the list of default values must have the same size as the list of parameters';
    1616    return
    1717end
    18 if ~exist('Comment','var')
    19     Comment=cell(NbParam,1);
     18if ~exist('Title','var')
     19    Title='get the input parameters';
    2020end
    2121prompt=cell(NbParam,1);
     
    3232    end
    3333end
    34 dlg_title = 'get the input parameters';
    3534options.Resize='on';
    36 answer = inputdlg(ListParam,dlg_title,NbParam,prompt,options);
    37 %answer = msgbox_uvmat('INPUT_TXT',ListParam);
     35options.WindowStyle='normal';
     36answer = inputdlg(ListParam,Title,1,prompt,options);
    3837if isempty(answer)
    3938    return
  • trunk/src/uvmat.m

    r1187 r1189  
    226226dir_perso=prefdir; % path to the directory .matlab containing the personal data of the current user
    227227profil_perso=fullfile(dir_perso,'uvmat_perso.mat');% personal data file uvmat_perso.mat' in .matlab
    228 if exist(profil_perso,'file')% if the file exists
     228if exist(profil_perso,'file')==2% if the file exists
    229229    h=load (profil_perso); % open the personal file
    230230    if isfield(h,'MenuFile')% load the saved menu of previously opened files
     
    243243    if isfield(h,'transform_fct') && iscell(h.transform_fct) % load the menu of transform fct set by user
    244244        for ilist=1:length(h.transform_fct)
    245             if exist(h.transform_fct{ilist},'file')
     245            if exist(h.transform_fct{ilist},'file')==2
    246246                [path,file]=fileparts(h.transform_fct{ilist});
    247247                transform_menu=[transform_menu; {file}];
     
    252252    if isfield(h,'export_fct') && iscell(h.export_fct) % load the menu of export fct set by user
    253253        for ilist=1:length(h.export_fct)
    254             if exist(h.export_fct{ilist},'file')
     254            if exist(h.export_fct{ilist},'file')==2
    255255                [path,file]=fileparts(h.export_fct{ilist});
    256256                export_menu=[export_menu; {file}];
     
    759759    end
    760760end
    761 if exist(MovieName,'file')
     761if exist(MovieName,'file')==2
    762762    backup=MovieName;
    763763    testexist=2;
    764764    while testexist==2
    765765        backup=[backup '~'];
    766         testexist=exist(backup,'file');
     766        testexist=exist(backup,'file')==2;
    767767    end
    768768    [success,message]=copyfile(MovieName,backup);%make backup of the existing file
     
    19431943
    19441944%------------------------------------------------------------------------
    1945 %-- introduce a section FileSeries in the xml file ImaDoc to virtually relabel frames 
     1945%-- introduce a section FileSeries in the xml file ImaDoc to virtually relabel frames
    19461946% --------------------------------------------------------------------
    19471947function MenuRelabelFrames_Callback(hObject, eventdata, handles)
    19481948
     1949
    19491950[RootPath,SubDir,RootFile,FileIndex,FileExt]=read_file_boxes(handles);
    19501951FileName=[fullfile(RootPath,SubDir,RootFile) FileIndex FileExt];
    1951 CheckRelabel=false;
    1952 % if the option is selected from previous 'off' state
    1953 if strcmp(get(handles.MenuRelabelFrames,'checked'),'off')
    1954     if strcmp(FileExt,'.seq')
    1955         XmlFile=regexprep(FileName,'.seq$','.xml');
     1952% CheckRelabel=false;
     1953
     1954if strcmp(FileExt,'.seq')
     1955    XmlFile=regexprep(FileName,'.seq$','.xml');
     1956else
     1957    XmlFile=fullfile(RootPath,[SubDir '.xml']);
     1958end
     1959[XmlData,errormsg]=imadoc2struct(XmlFile);
     1960if isempty(XmlData) || isempty(XmlData.Time)
     1961    msgbox_uvmat('ERROR',['the timing needs to be documented in the file ' XmlFile])
     1962    return
     1963end
     1964FileInfo=get_file_info(FileName);
     1965switch FileInfo.FileType
     1966    case 'multimage'
     1967        if strcmp(FileExt,'.tif') && ~isempty(regexp(RootFile,'^im', 'once'))% case of PCO images, document <FileSeries> in the xml file
     1968            ListParam={'Convention','NbFramePerFile','Dtj','NbDtj','Dti','NbDti'};
     1969            FileSeries.Convention='PCO';
     1970            FileSeries.NbFramePerFile=FileInfo.NumberOfFrames;
     1971%             BurstTiming.Dtj='';
     1972%             BurstTiming.NbDtj='';
     1973%             BurstTiming.Dti='';
     1974%             BurstTiming.NbDti='';
     1975        end
     1976    case 'rdvision'%TO CHECK******
     1977        check_time_rdvision(FileName,XmlData)
     1978end
     1979hbrowse=browse_data(fullfile(RootPath,SubDir))
     1980%STR = input('OK?')
     1981[BurstTiming,errormsg] = set_param_input(ListParam,{'PCO',FileInfo.NumberOfFrames,'','','',''},[]);%fill an input panel with Matlab fct 'inputdlg'
     1982FileSeries.Convention=BurstTiming.Convention; BurstTiming=rmfield(BurstTiming,'Convention');
     1983Camera.BurstTiming=BurstTiming;
     1984FileSeries.FileName={'im.tif';'im@0001.tif'};
     1985FileSeries.NbFramePerFile=BurstTiming.NbFramePerFile; BurstTiming=rmfield(BurstTiming,'NbFramePerFile');
     1986
     1987%
     1988% BrowseData=guidata(hbrowse);
     1989% SourceDir=get(BrowseData.SourceDir,'String');
     1990% ListExp=get(BrowseData.ListExperiments,'String');
     1991% ExpIndices=get(BrowseData.ListExperiments,'Value');
     1992% ListExp=ListExp(ExpIndices);
     1993% ListDevices=get(BrowseData.ListDevices,'String');
     1994% DeviceIndices=get(BrowseData.ListDevices,'Value');
     1995% ListDevices=ListDevices(DeviceIndices);
     1996% ListDataSeries=get(BrowseData.DataSeries,'String');
     1997% DataSeriesIndices=get(BrowseData.DataSeries,'Value');
     1998% ListDataSeries=ListDataSeries(DataSeriesIndices);
     1999% NbExp=0; % counter of the number of experiments set by the GUI browse_data
     2000% for iexp=1:numel(ListExp)
     2001%     if ~isempty(regexp(ListExp{iexp},'^\+/', 'once'))% if it is a folder
     2002%         for idevice=1:numel(ListDevices)
     2003%             if ~isempty(regexp(ListDevices{idevice},'^\+/', 'once'))% if it is a folder
     2004%                 for isubdir=1:numel(ListDataSeries)
     2005%                     if ~isempty(regexp(ListDataSeries{isubdir},'^\+/', 'once'))% if it is a folder
     2006%                         lpath= fullfile(SourceDir,regexprep(ListExp{iexp},'^\+/',''),...
     2007%                             regexprep(ListDevices{idevice},'^\+/',''));
     2008%                         ldir= regexprep(ListDataSeries{isubdir},'^\+/','');
     2009%                         if exist(fullfile(lpath,ldir),'dir')
     2010%                             NbExp=NbExp+1;
     2011%                             ListPath{NbExp}=lpath;
     2012%                             ListSubdir{NbExp}=ldir;
     2013%                             ExpIndex{NbExp}=iexp;
     2014%                         end
     2015%                     end
     2016%                 end
     2017%             end
     2018%         end
     2019%     end
     2020% end
     2021[ListPath, ListSubdir]=read_browsdata (hbrowse);
     2022NbExp=numel(ListSubdir);
     2023for iexp=1:NbExp
     2024    [checkupdate,XmlFile,errormsg]=update_imadoc(ListPath{iexp},ListSubdir{iexp},'Camera',Camera)
     2025    if ~strcmp(errormsg,'')
     2026        msgbox_uvmat('ERROR',errormsg);
    19562027    else
    1957     XmlFile=fullfile(RootPath,[SubDir '.xml']);
    1958     end
    1959     [XmlData,errormsg]=imadoc2struct(XmlFile);
    1960     if isempty(XmlData) || isempty(XmlData.Time)
    1961         msgbox_uvmat('ERROR',['the timing needs to be documented in the file ' XmlFile])
    1962         return
    1963     end
    1964     FileInfo=get_file_info(FileName);
    1965     switch FileInfo.FileType
    1966         case 'multimage'
    1967             if strcmp(FileExt,'.tif') && ~isempty(regexp(RootFile,'^im', 'once'))% case of PCO images, document <FileSeries> in the xml file
    1968                 FileSeries.Convention='PCO';
    1969                 FileSeries.FileName{1,1}='im.tif';
    1970                 FileSeries.FileName{2,1}='im@0001.tif';
    1971                 FileSeries.NbFramePerFile=FileInfo.NumberOfFrames;
    1972                 [checkupdate,xmlfile,errormsg]=update_imadoc(RootPath,SubDir,'FileSeries',FileSeries);
    1973                 if isempty(errormsg)
    1974                     disp([xmlfile 'updated with FileSeries'])
    1975                     CheckRelabel=true;
    1976                 else
    1977                     disp(errormsg)
    1978                 end
    1979             end
    1980         case 'rdvision'
    1981             check_time_rdvision(FileName,XmlData)
    1982     end
    1983     if CheckRelabel
    1984         set(handles.MenuRelabelFrames,'checked','on')
    1985         errormsg=update_series(handles,RootPath,SubDir,FileName,FileInfo,false,1);
    1986     end
    1987 else % option set to 'off'
    1988     set(handles.MenuRelabelFrames,'checked','off')%if the option was chcked, uncheck it
    1989     errormsg=update_series(handles,RootPath,SubDir,FileName,FileInfo,false,1);
    1990 end
     2028        update_imadoc(ListPath{iexp},ListSubdir{iexp},'FileSeries',FileSeries,0);% introduce the FileSeries data in the xml file
     2029        if checkupdate
     2030            disp([XmlFile ' updated with FileSeries'])
     2031        else
     2032            disp([XmlFile ' created with FileSeries'])
     2033        end
     2034    end
     2035end
     2036msgbox_uvmat('CONFIMATION',['FileSeries replicated for ' num2str(NbExp) ' experiments, open with uvmat to check']);
     2037
    19912038if ~isempty(errormsg)
    19922039    disp(errormsg)
     
    19962043function check_time_rdvision(FileName,XmlData)
    19972044s=ini2struct(FileName);
    1998     SeqData=s.sequenceSettings;
    1999     SeqData.width=str2double(SeqData.width);
    2000     SeqData.height=str2double(SeqData.height);
    2001     SeqData.bytesperpixel=str2double(SeqData.bytesperpixel);
    2002     SeqData.nb_frames=str2double(s.sequenceSettings.numberoffiles);
    2003     if isempty(SeqData.binrepertoire)%used when binrepertoire empty, strange feature of rdvision
    2004         SeqData.binrepertoire=regexprep(s.sequenceSettings.bindirectory,'\\$','');%tranform Windows notation to Linux
    2005         SeqData.binrepertoire=regexprep(SeqData.binrepertoire,'\','/');
    2006         [tild,binrepertoire,DirExt]=fileparts(SeqData.binrepertoire);
    2007         SeqData.binrepertoire=[SeqData.binrepertoire DirExt];
    2008     end
    2009    
    2010     %% reading the .sqb file
    2011      SqbFile=regexprep(FileName,'.seq$','.sqb');
    2012     m = memmapfile(SqbFile,'Format', { 'uint32' [1 1] 'offset'; ...
    2013         'uint32' [1 1] 'garbage1';...
    2014         'double' [1 1] 'timestamp';...
    2015         'uint32' [1 1] 'file_idx';...
    2016         'uint32' [1 1] 'garbage2' },'Repeat',SeqData.nb_frames);
    2017    
    2018     %%%%%%%BRICOLAGE in case of unreadable .sqb file: remplace lecture du fichier
    2019     %         ind=[111 114:211];%indices of bin files
    2020     %         w=1024;%w=width of images in pixels
    2021     %         h=1024;%h=height of images in pixels
    2022     %         bpp=2;% nbre of bytes per pixel
    2023     %         lengthimage=w*h*bpp;% lengthof an image record on the binary file
    2024     %         nbimages=32; %nbre of images of each camera in a bin file
    2025     %         for ii=1:32*numel(ind)
    2026     %             data(ii).offset=mod(ii-1,32)*2*lengthimage+lengthimage;%Dalsa_2
    2027     %             %data(ii).offset=mod(ii-1,32)*2*lengthimage;%Dalsa_1
    2028     %             data(ii).file_idx=ind(ceil(ii/32));
    2029     %             data(ii).timestamp=0.2*(ii-1);
    2030     %         end
    2031     %         m.Data=data;
    2032     %%%%%%%
    2033     timestamp=zeros(1,numel(m.Data));
    2034     for ii=1: numel(m.Data)
    2035         timestamp(ii)=m.Data(ii).timestamp;
    2036     end
    2037     difftime=XmlData.Time(2:end,2:end);
    2038     difftime=timestamp'-reshape(difftime,[],1);
    2039     disp(['time from xml and timestamp differ by ' num2str(max(max(abs(difftime))))])
    2040     if max(abs(difftime))>0.01
    2041        figure(1)
    2042        plot(timestamp,difftime)
    2043        xlabel('time(s)')
    2044        ylabel('timestamp-XmlData.Time(s)')
    2045     end
    2046    
    2047         %% checking consistency with the xml file
    2048     if ~isequal(SeqData.nb_frames,numel(timestamp))
    2049         disp_uvmat('ERRROR',['inconsistent number of images ' num2str(SeqData.nb_frames) ' with respect to the xml file: ' num2str(numel(timestamp))] ,checkrun);
    2050         return
    2051     end   
    2052    
    2053     disp ('max time difference xml and timestamps (IN SEC.)')
    2054     max(abs(difftime))
     2045SeqData=s.sequenceSettings;
     2046SeqData.width=str2double(SeqData.width);
     2047SeqData.height=str2double(SeqData.height);
     2048SeqData.bytesperpixel=str2double(SeqData.bytesperpixel);
     2049SeqData.nb_frames=str2double(s.sequenceSettings.numberoffiles);
     2050if isempty(SeqData.binrepertoire)%used when binrepertoire empty, strange feature of rdvision
     2051    SeqData.binrepertoire=regexprep(s.sequenceSettings.bindirectory,'\\$','');%tranform Windows notation to Linux
     2052    SeqData.binrepertoire=regexprep(SeqData.binrepertoire,'\','/');
     2053    [tild,binrepertoire,DirExt]=fileparts(SeqData.binrepertoire);
     2054    SeqData.binrepertoire=[SeqData.binrepertoire DirExt];
     2055end
     2056
     2057%% reading the .sqb file
     2058SqbFile=regexprep(FileName,'.seq$','.sqb');
     2059m = memmapfile(SqbFile,'Format', { 'uint32' [1 1] 'offset'; ...
     2060    'uint32' [1 1] 'garbage1';...
     2061    'double' [1 1] 'timestamp';...
     2062    'uint32' [1 1] 'file_idx';...
     2063    'uint32' [1 1] 'garbage2' },'Repeat',SeqData.nb_frames);
     2064
     2065%%%%%%%BRICOLAGE in case of unreadable .sqb file: remplace lecture du fichier
     2066%         ind=[111 114:211];%indices of bin files
     2067%         w=1024;%w=width of images in pixels
     2068%         h=1024;%h=height of images in pixels
     2069%         bpp=2;% nbre of bytes per pixel
     2070%         lengthimage=w*h*bpp;% lengthof an image record on the binary file
     2071%         nbimages=32; %nbre of images of each camera in a bin file
     2072%         for ii=1:32*numel(ind)
     2073%             data(ii).offset=mod(ii-1,32)*2*lengthimage+lengthimage;%Dalsa_2
     2074%             %data(ii).offset=mod(ii-1,32)*2*lengthimage;%Dalsa_1
     2075%             data(ii).file_idx=ind(ceil(ii/32));
     2076%             data(ii).timestamp=0.2*(ii-1);
     2077%         end
     2078%         m.Data=data;
     2079%%%%%%%
     2080timestamp=zeros(1,numel(m.Data));
     2081for ii=1: numel(m.Data)
     2082    timestamp(ii)=m.Data(ii).timestamp;
     2083end
     2084difftime=XmlData.Time(2:end,2:end);
     2085difftime=timestamp'-reshape(difftime,[],1);
     2086disp(['time from xml and timestamp differ by ' num2str(max(max(abs(difftime))))])
     2087if max(abs(difftime))>0.01
     2088    figure(1)
     2089    plot(timestamp,difftime)
     2090    xlabel('time(s)')
     2091    ylabel('timestamp-XmlData.Time(s)')
     2092end
     2093
     2094%% checking consistency with the xml file
     2095if ~isequal(SeqData.nb_frames,numel(timestamp))
     2096    disp_uvmat('ERRROR',['inconsistent number of images ' num2str(SeqData.nb_frames) ' with respect to the xml file: ' num2str(numel(timestamp))] ,checkrun);
     2097    return
     2098end
     2099
     2100disp ('max time difference xml and timestamps (IN SEC.)')
     2101max(abs(difftime))
    20552102%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    20562103% MenuRun Callbacks
     
    22342281%% look for the input file existence and properties in the structure FileInfo
    22352282errormsg='';%default
    2236 if isempty(regexp(fileinput,'^http')) && ~exist(fileinput,'file')
     2283if isempty(regexp(fileinput,'^http', 'once')) && exist(fileinput,'file')~=2
    22372284    errormsg=['input file ' fileinput  ' does not exist'];
    22382285    msgbox_uvmat('ERROR',errormsg)
     
    23292376    set(handles.num_j2,'String',num2stra(j2,NomType));
    23302377    if isfield(FileInfo,'MaskFile')
    2331         if exist(FileInfo.MaskFile,'file')
     2378        if exist(FileInfo.MaskFile,'file')==2
    23322379            set(handles.CheckMask,'Value',1)
    23332380        else
     
    23872434    %updtate the indices of the second field series to correspond to the newly opened one
    23882435    FileName_1=fullfile_uvmat(Input.RootPath_1,Input.SubDir_1,Input.RootFile_1,Input.FileExt_1,Input.NomType_1,i1_s,i2_s,j1_s,j2_s);
    2389     if exist(FileName_1,'file')
     2436    if exist(FileName_1,'file')==2
    23902437        FileIndex_1=fullfile_uvmat('','','','',Input.NomType_1,i1_s,i2_s,j1_s,j2_s);
    23912438    else
     
    24182465dir_perso=prefdir;
    24192466profil_perso=fullfile(dir_perso,'uvmat_perso.mat');
    2420 if exist(profil_perso,'file')
     2467if exist(profil_perso,'file')==2
    24212468    save (profil_perso,'MenuFile','RootPath','-append'); %store the file names for future opening of uvmat
    24222469else
     
    29813028if isequal(option,'view xml')
    29823029    FileXml=fullfile(RootPath,[SubDir '.xml']);
    2983     if ~exist(FileXml,'file')% case of civ files , removes the extension for subdir
     3030    if ~exist(FileXml,'file')==2% case of civ files , removes the extension for subdir
    29843031        FileXml=fullfile(RootPath,[regexprep(SubDir,'\..+$','') '.xml']);
    29853032    end
     
    30933140        UvData.TransformName=TransformName; %update the recorded name on UvData
    30943141        set(handles.uvmat,'UserData',UvData);
    3095         if ~exist(MaskName,'file')
     3142        if exist(MaskName,'file')~=2
    30963143            if isfield(MaskInfo,'maskhandle')&& ishandle(Mask.maskhandle)
    30973144                delete(MaskInfo.maskhandle)
     
    30993146        else
    31003147            %read mask image
    3101             [MaskField,tild,errormsg] = read_field(MaskName,'image');
     3148            [MaskField,~,errormsg] = read_field(MaskName,'image');
    31023149            if ~isempty(errormsg)
    31033150                return
     
    37863833    frame_index_1=1;
    37873834    if ~isempty(FileName_1)
    3788         if ~exist(FileName_1,'file')
     3835        if exist(FileName_1,'file')~=2
    37893836            errormsg=['second file ' FileName_1 ' does not exist'];
    37903837            return
     
    49224969            imagename=fullfile_uvmat(RootPath,SubDirBase,RootFile,'.png',NomType,i1,[],j1,[]);
    49234970        end
    4924         if ~exist(imagename,'file')
     4971        if exist(imagename,'file')~=2
    49254972            imagename=uigetfile_uvmat('Pick an image file',imagename,'image');
    49264973            if isempty(imagename)
     
    50885135            imagename=fullfile_uvmat(RootPath,SubDirBase,RootFile,'.png','_1',i1,[],j1,[]);
    50895136        end
    5090         if ~exist(imagename,'file')
     5137        if exist(imagename,'file')~=2
    50915138            imagename=uigetfile_uvmat('Pick an image file',imagename,'image');
    50925139
     
    54365483        dir_perso=prefdir;%personal Matalb directory
    54375484        profil_perso=fullfile(dir_perso,'uvmat_perso.mat');
    5438         if exist(profil_perso,'file')
     5485        if exist(profil_perso,'file')==2
    54395486            nb_builtin=UvData.OpenParam.NbBuiltin;% number of 'builtin' (basic) transform fcts in uvmat
    54405487            if nb_builtin<numel(list_path)
Note: See TracChangeset for help on using the changeset viewer.