Changeset 665


Ignore:
Timestamp:
Jul 11, 2013, 11:57:23 PM (7 years ago)
Author:
sommeria
Message:

bugs corrected for mask

File:
1 edited

Legend:

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

    r661 r665  
    6161% relevant data in gcbf:.FileType,.FileInfo,.Time,.TimeUnit,.GeometryCalib{1};
    6262
    63 %% set visibility options: case civ_matlab
     63%% set visibility options:
    6464if strcmp(Param.Action.ActionName,'civ_series')
    6565        set(handles.Program,'String','civ_series')
     
    155155set(handles.ListPairCiv2,'Value',1)
    156156set(handles.ListPairCiv2,'String',{''})
    157 fill_GUI(Param,hObject);%fill the GUI with the parameters retrieved from the input Param
     157fill_GUI(Param.ActionInput,hObject);%fill the GUI with the parameters retrieved from the input Param
    158158
    159159       
     
    15771577filegrid='';
    15781578if value
    1579     filebase=get(handles.RootPath,'String');
     1579        hseries=findobj(allchild(0),'Tag','series');
     1580    hhseries=guidata(hseries);
     1581    InputTable=get(hhseries.InputTable,'Data');
     1582     ind_A=1;% line index of the (first) image series
     1583    if strcmp(InputTable{1,5},'.nc');
     1584        ind_A=2;
     1585    end
     1586    filebase=InputTable{ind_A,1};
    15801587    [nbslice, flag_grid]=get_grid(filebase,handles);% look for a grid with appropriate name
    15811588    if isequal(flag_grid,1)
     
    15871594            filebase=filegrid;
    15881595        end
    1589         [FileName, PathName] = uigetfile( ...
    1590             {'*.grid', ' (*.grid)';
    1591             '*.grid',  '.grid files '; ...
    1592             '*.*', 'All Files (*.*)'}, ...
    1593             'Pick a file',filebase);
    1594         filegrid=fullfile(PathName,FileName);
     1596       filegrid = uigetfile_uvmat('pick a grid file .grid:',filebase,'.grid');
    15951597        set(hObject,'UserData',filegrid);%store for future use
    1596         if ~(isempty(FileName)||isempty(PathName)||isequal(FileName,0)||~exist(filegrid,'file'))
     1598        if ~isempty(filegrid)
    15971599            testgrid=1;
    1598         end
     1600        end
     1601        set(hObject,'UserData',filegrid);%store for future use
    15991602    end
    16001603end
     
    16461649hchildren=get(hparent,'children');
    16471650handle_txtbox=findobj(hchildren,'tag','Mask');% look for the mask name box in the same panel
     1651
    16481652testmask=0;
    16491653if value
    1650     filebase=get(handles.RootPath,'String');
    1651     [nbslice, flag_mask]=get_mask(filebase,handles);% look for a mask with appropriate name
     1654    hseries=findobj(allchild(0),'Tag','series');
     1655    hhseries=guidata(hseries);
     1656    InputTable=get(hhseries.InputTable,'Data');
     1657     ind_A=1;% line index of the (first) image series
     1658    if strcmp(InputTable{1,5},'.nc');
     1659        ind_A=2;
     1660    end
     1661    [nbslice, flag_mask]=get_mask(InputTable{ind_A,1},handles);% look for a mask with appropriate name
    16521662    if isequal(flag_mask,1)
    16531663        filemask=[num2str(nbslice) 'mask'];
     
    16581668            filebase=filemask;
    16591669        end
    1660         [FileName, PathName] = uigetfile( ...
    1661             {'*.png', ' (*.png)';
    1662             '*.png',  '.png files '; ...
    1663             '*.*', 'All Files (*.*)'}, ...
    1664             'Pick a mask file *.png',filebase);
    1665         filemask=fullfile(PathName,FileName);
     1670        filemask= uigetfile_uvmat('pick a mask image file:',InputTable{ind_A,1},'image');
    16661671        set(hObject,'UserData',filemask);%store for future use
    1667         if ~(isempty(FileName)||isempty(PathName)||isequal(FileName,0)||~exist(filemask,'file'))
     1672        if ~isempty(filemask)
    16681673            testmask=1;
    16691674        end
Note: See TracChangeset for help on using the changeset viewer.