Ignore:
Timestamp:
Feb 24, 2014, 10:51:40 PM (10 years ago)
Author:
sommeria
Message:

fct improved by reducing the input file check when selected.

File:
1 edited

Legend:

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

    r711 r716  
    5757set(hObject,'WindowButtonDownFcn',{'mouse_down'}) % allows mouse action with right button (zoom for uicontrol display)
    5858hseries=findobj(allchild(0),'Tag','series');
    59 SeriesData.ParentHandle=hseries;
     59hhseries=guidata(hseries);
     60%SeriesData.ParentHandle=hseries;
    6061SeriesData=get(hseries,'UserData');
    6162% relevant data in gcbf:.FileType,.FileInfo,.Time,.TimeUnit,.GeometryCalib{1};
     
    8788NomTypeInput=Param.InputTable{1,4};
    8889FileExt=Param.InputTable{1,5};
     90FileType='image';%fdefault
     91FileInfo=[];
    8992if isfield(SeriesData,'FileType')&&isfield(SeriesData,'FileInfo')
    9093    FileType=SeriesData.FileType{1};%type of the first input file series
    9194    FileInfo=SeriesData.FileInfo{1};
    9295else
    93     msgbox_uvmat('ERROR','please refresh the input file series')
    94     return
     96    set(hhseries.REFRESH,'BackgroundColor',[1 0 1])
     97%     msgbox_uvmat('ERROR','please refresh the input file series')
     98%     return
    9599end
    96100
     
    127131            [PathCiv2_ImageB,Civ2_ImageB,FileExtA]=fileparts(Data.Civ2_ImageB);
    128132        end
    129         hhseries=guidata(hseries);
    130133        if size(Param.InputTable,1)==1
    131134            series('display_file_name',hhseries,Data.Civ1_ImageA,'append');%append the image series to the input list
     
    146149        return
    147150end
    148 if numel(SeriesData.FileType)>=2 && strcmp(SeriesData.FileType{end-1},'image') &&   strcmp(SeriesData.FileType{end},'image')
     151if isfield(SeriesData,'FileType') && numel(SeriesData.FileType)>=2 && strcmp(SeriesData.FileType{end-1},'image') &&   strcmp(SeriesData.FileType{end},'image')
    149152    set(handles.ListCompareMode,'Value',3)% we compare two image series term to term ('shift')
    150153    set(handles.PairIndices,'Visible','off')
     
    198201MaxIndex_j=1;%default
    199202MinIndex_j=1;
    200 if isfield(Param.IndexRange,'MaxIndex_j')&&isfield(Param.IndexRange,'MinIndex_j')
     203if isfield(Param.IndexRange,'MaxIndex_j')&&isfield(Param.IndexRange,'MinIndex_j')...
     204     && numel(Param.IndexRange.MaxIndex_j')>=iview_image &&numel(Param.IndexRange.MinIndex_j')>=iview_image 
    201205MaxIndex_j=Param.IndexRange.MaxIndex_j(iview_image);
    202206MinIndex_j=Param.IndexRange.MinIndex_j(iview_image);
     
    214218        set(handles.ListPairMode,'Value',1)% advice 'pair j1-j2' except in MaxIndex_j is large
    215219    end
    216 %elseif ~(strcmp(FileType,'video') || strcmp(FileType,'mmreader'))
    217220else
    218221    set(handles.ListPairMode,'String',{'pair j1-j2';'series(Dj)';'series(Di)'})%multiple choice
     
    284287%% introduce the stored parameters if relevant
    285288if isfield(Param,'ActionInput')
    286 fill_GUI(Param.ActionInput,hObject);%fill the GUI with the parameters retrieved from the input Param
     289    fill_GUI(Param.ActionInput,hObject);%fill the GUI with the parameters retrieved from the input Param
     290    hcheckgrid=findobj(handles.civ_input,'Tag','CheckGrid');
     291    for ilist=1:numel(hcheckgrid)
     292        if get(hcheckgrid(ilist),'Value')
     293            hparent=get(hcheckgrid(ilist),'parent');%handles of the parent panel
     294            hchildren=get(hparent,'children');
     295            handle_txtbox=findobj(hchildren,'tag','Grid');% look for the grid name box in the same panel
     296            handle_dx=findobj(hchildren,'tag','num_Dx');
     297            handle_dy=findobj(hchildren,'tag','num_Dy');
     298            handle_title_dx=findobj(hchildren,'tag','title_Dx');
     299            handle_title_dy=findobj(hchildren,'tag','title_Dy');
     300            set(handle_dx,'Visible','off');
     301            set(handle_dy,'Visible','off');
     302            set(handle_title_dy,'Visible','off');
     303            set(handle_title_dx,'Visible','off');
     304        end
     305    end
    287306end
    288307
     
    343362% detect the file type, get the movie object if relevant, and look for the corresponding file series:
    344363% the root name and indices may be corrected by including the first index i1 if a corresponding xml file exists
    345 %[RootPath,Civ1_ImageA,Civ2_ImageB,i1_series,tild,j1_series,tild,NomTypeIma,FileType,MovieObject]=find_file_series(FilePath,[FileName ImaExt]);
    346364switch Param.FileType{1}
    347365    case {'image','multimage','video','mmreader'}
Note: See TracChangeset for help on using the changeset viewer.