Changeset 363 for trunk/src/civ.m


Ignore:
Timestamp:
Jan 10, 2012, 9:13:31 AM (12 years ago)
Author:
sommeria
Message:

civ2 introduced in civ_matlab (still bugs)
bugs corrected in civ and fill_GUI, read_GUI
comments in get_field

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/civ.m

    r362 r363  
    2323%TODO: search range
    2424
    25 % Last Modified by GUIDE v2.5 08-Jan-2012 11:00:13
     25% Last Modified by GUIDE v2.5 09-Jan-2012 20:42:45
    2626% Begin initialization code - DO NOT EDIT
    2727gui_Singleton = 1;
     
    619619        ValueCiv1=1;
    620620    end
    621     set(handles.txt_SubdirCiv1,'String',listdir{ValueCiv1})
     621    set(handles.SubdirCiv1,'String',listdir{ValueCiv1})
    622622    ValueCiv2=get(handles.ListSubdirCiv2,'Value');
    623623    if ValueCiv2>numel(listdir)
    624624        ValueCiv2=1;
    625625    end
    626     set(handles.txt_SubdirCiv2,'String',listdir{ValueCiv2})
     626    set(handles.SubdirCiv2,'String',listdir{ValueCiv2})
    627627else
    628628    ValueCiv1=Value;
    629629    ValueCiv2=Value;
    630      set(handles.txt_SubdirCiv1,'String',listdir{Value})
    631      set(handles.txt_SubdirCiv2,'String',listdir{Value})
     630     set(handles.SubdirCiv1,'String',listdir{Value})
     631     set(handles.SubdirCiv2,'String',listdir{Value})
    632632end
    633633set(handles.ListSubdirCiv1,'Value',ValueCiv1)
     
    636636set(handles.ListSubdirCiv2,'String',[listdir;'new...'])
    637637if isempty(listdir)
    638     set(handles.txt_SubdirCiv1,'String','CIV')
    639     set(handles.txt_SubdirCiv2,'String','CIV')
     638    set(handles.SubdirCiv1,'String','CIV')
     639    set(handles.SubdirCiv2,'String','CIV')
    640640end
    641641
     
    664664%------------------------------------------------------------------------
    665665% --- Executes on carriage return on the subdir checkciv1 edit window
    666 function txt_SubdirCiv1_Callback(hObject, eventdata, handles)
    667 %------------------------------------------------------------------------
    668 SubDir=get(handles.txt_SubdirCiv1,'String');
     666function SubdirCiv1_Callback(hObject, eventdata, handles)
     667%------------------------------------------------------------------------
     668SubDir=get(handles.SubdirCiv1,'String');
    669669menu_str=get(handles.ListSubdirCiv1,'String');% read the list of subdirectories for update
    670670ichoice=find(strcmp(SubDir,menu_str),1);
     
    676676set(handles.ListSubdirCiv1,'Value',ilist)% select the selected subdir in the menu
    677677if get(handles.CheckCiv1,'Value')% if Civ1 is performed
    678     set(handles.txt_SubdirCiv2,'String',SubDir);% set by default civ2 directory the same as civ1
     678    set(handles.SubdirCiv2,'String',SubDir);% set by default civ2 directory the same as civ1
    679679    set(handles.ListSubdirCiv2,'Value',ilist)
    680680else % if Civ1 data already exist
     
    687687%------------------------------------------------------------------------
    688688% --- Executes on carriage return on the SubDir checkciv1 edit window
    689 function txt_SubdirCiv2_Callback(hObject, eventdata, handles)
    690 %------------------------------------------------------------------------
    691 SubDir=get(handles.txt_SubdirCiv1,'String');
     689function SubdirCiv2_Callback(hObject, eventdata, handles)
     690%------------------------------------------------------------------------
     691SubDir=get(handles.SubdirCiv1,'String');
    692692menu_str=get(handles.ListSubdirCiv2,'String');% read the list of subdirectories for update
    693693ichoice=find(strcmp(SubDir,menu_str),1);
     
    762762end
    763763set(handles.PairIndices,'Visible','on')
    764 set(handles.txt_SubdirCiv1,'Visible','on')
     764set(handles.SubdirCiv1,'Visible','on')
    765765set(handles.ListSubdirCiv1,'Visible','on')
    766766if ~opening
     
    773773    set(handles.TitlePairCiv2,'Visible','on')
    774774    set(handles.TitleSubdirCiv2,'Visible','on')
    775     set(handles.txt_SubdirCiv2,'Visible','on')
     775    set(handles.SubdirCiv2,'Visible','on')
    776776    set(handles.ListSubdirCiv2,'Visible','on')
    777777    set(handles.ListPairCiv2,'Visible','on')
     
    784784else
    785785    set(handles.TitleSubdirCiv2,'Visible','off')
    786     set(handles.txt_SubdirCiv2,'Visible','off')
     786    set(handles.SubdirCiv2,'Visible','off')
    787787    set(handles.ListSubdirCiv2,'Visible','off')
    788788    set(handles.ListPairCiv2,'Visible','off')
     
    16921692    end
    16931693end
     1694Param=rmfield(Param,'status');
     1695Param=rmfield(Param,'xml');
    16941696t=struct2xml(Param);
     1697t=set(t,1,'Name','CivDoc');% set the head label
    16951698save(t,[namedoc '.xml']); %save GUI  parameters as xml file
    16961699saveas(gcbf,namefigfull);%save the interface with name namefigfull (A CHANGER EN FICHIER  .xml)
     
    19341937
    19351938%check dir
    1936 subdir_civ1=get(handles.txt_SubdirCiv1,'String');%subdirectory subdir_civ1 for the netcdf output data
    1937 subdir_civ2=get(handles.txt_SubdirCiv2,'String');
     1939subdir_civ1=get(handles.SubdirCiv1,'String');%subdirectory subdir_civ1 for the netcdf output data
     1940subdir_civ2=get(handles.SubdirCiv2,'String');
    19381941if isequal(subdir_civ1,''),subdir_civ1='CIV'; end% put default subdir
    19391942if isequal(subdir_civ2,''),subdir_civ2=subdir_civ1; end% put default subdir
     
    19851988        end
    19861989 
    1987         %create the new txt_SubdirCiv1
     1990        %create the new SubdirCiv1
    19881991        if ~exist(fullfile(Path_ima,subdir_civ1_new),'dir')
    19891992%             cd(Path_ima);         
     
    20282031                end
    20292032            end
    2030             %create the new txt_SubdirCiv1
     2033            %create the new SubdirCiv1
    20312034            if ~exist(fullfile(Path_ima,subdir_civ1_new),'dir')
    20322035%                    cd(Path_ima);         
     
    22102213            end
    22112214            subdir_civ2=subdir_civ2_new;
    2212             %create the new txt_SubdirCiv1
     2215            %create the new SubdirCiv1
    22132216            if ~exist(fullfile(Path_ima,subdir_civ2_new),'dir')
    22142217                [xx,m2]=mkdir(subdir_civ2_new);
     
    23842387    end
    23852388end
    2386 set(handles.txt_SubdirCiv1,'String',subdir_civ1);%update the edit box
    2387 set(handles.txt_SubdirCiv2,'String',subdir_civ2);%update the edit box
     2389set(handles.SubdirCiv1,'String',subdir_civ1);%update the edit box
     2390set(handles.SubdirCiv2,'String',subdir_civ2);%update the edit box
    23882391browse.nom_type_nc=nom_type_nc;
    23892392set(handles.RootName,'UserData',browse); %update the nomenclature type for uvmat
     
    29622965
    29632966%% reads .nc subdirectoy and image numbers from the interface
    2964 subdir_civ1=get(handles.txt_SubdirCiv1,'String');%subdirectory subdir_civ1 for the netcdf data
    2965 subdir_civ2=get(handles.txt_SubdirCiv2,'String');%subdirectory subdir_civ2 for the netcdf data
     2967subdir_civ1=get(handles.SubdirCiv1,'String');%subdirectory subdir_civ1 for the netcdf data
     2968subdir_civ2=get(handles.SubdirCiv2,'String');%subdirectory subdir_civ2 for the netcdf data
    29662969ref_i=str2double(get(handles.ref_i,'String'));
    29672970if isequal(mode,'pair j1-j2')%|isequal(mode,'st_pair j1-j2')
     
    31933196%
    31943197% %reads .nc subdirectory and image numbers from the interface
    3195 % subdir_civ1=get(handles.txt_SubdirCiv1,'String');%subdirectory subdir_civ1 for the netcdf data
    3196 % subdir_civ2=get(handles.txt_SubdirCiv2,'String');%subdirectory subdir_civ2 for the netcdf data
     3198% subdir_civ1=get(handles.SubdirCiv1,'String');%subdirectory subdir_civ1 for the netcdf data
     3199% subdir_civ2=get(handles.SubdirCiv2,'String');%subdirectory subdir_civ2 for the netcdf data
    31973200% ref_i=str2double(get(handles.ref_i,'String'));
    31983201% if isequal(mode,'pair j1-j2')%|isequal(mode,'st_pair j1-j2')
     
    36113614nbslice=1;
    36123615
    3613 % subdir=get(handles.txt_SubdirCiv1,'String');
     3616% subdir=get(handles.SubdirCiv1,'String');
    36143617[Path,Name]=fileparts(filebase);
    36153618if ~isdir(Path)
     
    37073710    end   
    37083711end
    3709 set(handles.txt_SubdirCiv1,'String',SubDir);
     3712set(handles.SubdirCiv1,'String',SubDir);
    37103713errormsg=find_netcpair_civ(handles,1);
    37113714if ~isempty(errormsg)
     
    37283731    end
    37293732end
    3730 set(handles.txt_SubdirCiv2,'String',SubDir);
     3733set(handles.SubdirCiv2,'String',SubDir);
    37313734
    37323735%------------------------------------------------------------------------
Note: See TracChangeset for help on using the changeset viewer.