Changeset 153


Ignore:
Timestamp:
Dec 9, 2010, 11:31:04 PM (10 years ago)
Author:
sommeria
Message:

civ.m: bug on field numbers repaired
other: various cleaning and bug repair for the creation of a new object

Location:
trunk/src
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/civ.m

    r150 r153  
    6868testall=0;
    6969%default input parameters:
    70 num1=1; % set of field i numbers
    71 num2=1; % set of field i numbers
    72 num_a=1; % set of field j numbers (fields a)
    73 num_b=1; % second set of field j numbers (fields b)
     70num_i1=1; % set of field i numbers
     71num_i2=1; % set of field i numbers
     72num_j1=1; % set of field j numbers (fields a)
     73num_j2=1; % second set of field j numbers (fields b)
    7474subdir='A'; % subdir for the netcdf result files
    7575ind_opening=1; % proposed operation number (1=civ1,2=fix1,3=patch1,4=civ2,5=fix2,6=patch2)
     
    7878    filebase=param.RootName;
    7979    nom_type_read=param.NomType;
    80     num1=param.num1;
    81     num2=param.num2;
    82     num_a=param.num_a;
    83     num_b=param.num_b;
     80    num_i1=param.num1;
     81    if isnan(num_i1),num_i1=1;end
     82    num_i2=param.num2;
     83    if isnan(num_i2),num_i2=num_i1;end
     84    num_j1=param.num_a;
     85    if isnan(num_j1),num_j1=1;end
     86    num_j2=param.num_b;
     87    if isnan(num_j2),num_j2=num_j1;end
    8488    subdir=param.SubDir;
    8589    ind_opening=param.IndOpening;
    8690    ext=param.ImaExt;
    8791end
    88 browse.num_i1=num1;
    89 browse.num_i2=num2;
    90 browse.num_j1=num_a;
    91 browse.num_j2=num_b;
     92browse.num_i1=num_i1;
     93browse.num_i2=num_i2;
     94browse.num_j1=num_j1;
     95browse.num_j2=num_j2;
    9296if ~isempty(ext) && (~isempty(imformats(ext(2:end)))||strcmpi(ext,'.avi'));%if an image file has been opened by uvmat
    9397    set(handles.ImaExt,'String',ext)
     
    195199
    196200% set the range of fields (1:1 by default) and selected pair
    197 if isnan(num2)||isequal(num2,num1)
    198     num_ref_i=num1;
    199 else
    200     num_ref_i=floor((num1+num2)/2);
    201     browse.incr_pair(1)=num2-num1;
     201if isequal(num_i2,num_i1)
     202    num_ref_i=num_i1;
     203else
     204    num_ref_i=floor((num_i1+num_i2)/2);
     205    browse.incr_pair(1)=num_i2-num_i1;
    202206    browse.incr_pair(2)=0;
    203207end
    204 if isnan(num_b)||isequal(num_a,num_b)
    205     if isnan(num_a)
     208if isequal(num_j1,num_j2)
     209    if isnan(num_j1)
    206210        num_ref_j=1;
    207211    else
    208         num_ref_j=num_a;
    209     end
    210 else
    211     num_ref_j=floor((num_a+num_b)/2);
    212     browse.incr_pair(2)=num_b-num_a;
     212        num_ref_j=num_j1;
     213    end
     214else
     215    num_ref_j=floor((num_j1+num_j2)/2);
     216    browse.incr_pair(2)=num_j2-num_j1;
    213217end
    214218set(handles.first_i,'String',num2str(num_ref_i));
     
    658662    %     nbdetect=0;%test of detected images
    659663    field_i=browse.num_i2;
     664    imagename=name_generator(filebase,field_i,1,ext_search,nom_type_search);
     665    imagename_plus='';
    660666    idetect=1;
    661     while idetect==1 %look for the maximum file number in the series
    662         imagename=name_generator(filebase,field_i+1,1,ext_search,nom_type_search);
    663         idetect=(exist(imagename,'file')==2);
     667    while idetect %look for the maximum file number in the series
     668        imagename_plus=name_generator(filebase,field_i+1,1,ext_search,nom_type_search);
     669        idetect=(exist(imagename_plus,'file')==2)&& ~strcmp(imagename,imagename_plus);
    664670        if idetect
    665671            field_i=field_i+1;
     
    670676    nbfield=field_i;% last detected field number
    671677    field_i=browse.num_i1;%look for the minimum file number in the series
     678    imagename_min='';
    672679    idetect=1;
    673680    while idetect==1
    674         imagename=name_generator(filebase,field_i-1,1,ext_search,nom_type_search);
    675         idetect=(exist(imagename,'file')==2);
     681        imagename_min=name_generator(filebase,field_i-1,1,ext_search,nom_type_search);
     682        idetect=(exist(imagename_min,'file')==2)&& ~strcmp(imagename,imagename_min);
    676683        if idetect
    677684            field_i=field_i-1;
     
    682689        field_i=browse.num_i1;
    683690        field_j=browse.num_j2;
     691        imagename_plus='';
    684692        jdetect=1;
    685693        while jdetect==1 %look for the maximum file number in the series
    686             imagename=name_generator(filebase,field_i,field_j,ext_search,nom_type_search);
    687             jdetect=(exist(imagename,'file')==2);
     694            imagename_plus=name_generator(filebase,field_i,field_j+1,ext_search,nom_type_search);
     695            jdetect=(exist(imagename_plus,'file')==2)&& ~strcmp(imagename,imagename_plus);
    688696            if jdetect
    689697                field_j=field_j+1;
     
    24792487    vers=0;
    24802488    subdir_civ1_new=subdir_civ1;
    2481     ind_test=0;
    2482     while detect==1 && ind_test<10%create a new subdir if the netcdf files already exist
     2489    while detect==1 %create a new subdir if the netcdf files already exist
    24832490        for ifile=1:nbfield
    24842491            for j=1:nbslice
  • trunk/src/editxml.m

    r89 r153  
    3333                   'gui_LayoutFcn',  [] , ...
    3434                   'gui_Callback',   []);
    35 if nargin & isstr(varargin{1})
     35if nargin && ischar(varargin{1}) && ~isempty(regexp(varargin{1},'_Callback','once'))
    3636    gui_State.gui_Callback = str2func(varargin{1});
    3737end
  • trunk/src/mouse_motion.m

    r152 r153  
    148148%                                     nxy(1)=numel(y);
    149149%                                     nxy(2)=numel(x);
    150                                     MaxAY=max(y(1),y(end));
    151                                     MinAY=min(y(1),y(end));
    152                                     if (xy(1,1)>x(1))&(xy(1,1)<x(end))&(xy(1,2)<MaxAY)&(xy(1,2)>MinAY)
    153                                         indx0=1+round((nxy(2)-1)*(xy(1,1)-x(1))/(x(end)-x(1)));% index x of pixel
    154                                         indy0=1+round((nxy(1)-1)*(xy(1,2)-y(1))/(y(end)-y(1)));% index y of pixel
     150                                    MaxAY=max(y(1),y(end)); %#ok<COLND>
     151                                    MinAY=min(y(1),y(end)); %#ok<COLND>
     152                                    if (xy(1,1)>x(1))&(xy(1,1)<x(end))&(xy(1,2)<MaxAY)&(xy(1,2)>MinAY) %#ok<COLND>
     153                                        indx0=1+round((nxy(2)-1)*(xy(1,1)-x(1))/(x(end)-x(1)));%#ok<COLND> % index x of pixel
     154                                        indy0=1+round((nxy(1)-1)*(xy(1,2)-y(1))/(y(end)-y(1)));%#ok<COLND> % index y of pixel
    155155                                        if indx0>=1 & indx0<=nxy(2) & indy0>=1 & indy0<=nxy(1)
    156156                                            text_displ_2=['i='  num2str(indx0) ',j=' num2str(indy0) ','];
  • trunk/src/plot_field.m

    r150 r153  
    310310
    311311hfig=get(haxes,'parent');
    312 AxeData=data;
     312AxeData=[];%data;
    313313
    314314ColorOrder=[1 0 0;0 0.5 0;0 0 1;0 0.75 0.75;0.75 0 0.75;0.75 0.75 0;0.25 0.25 0.25];
     
    516516end
    517517AxeData.NbDim=2;
    518 if isfield(Data,'ObjectCoord')
    519     AxeData.ObjectCoord=Data.ObjectCoord;
    520 end
     518% if isfield(Data,'ObjectCoord')
     519%     AxeData.ObjectCoord=Data.ObjectCoord;
     520% end
    521521errormsg=[];%default
    522522test_ima=0; %default: test for image or map plot
     
    858858        AxeData=[];
    859859    end
    860     AxeData.A=A;
    861     AxeData.AX=[AX(1) AX(end)];
    862     AxeData.AY=[AY(1) AY(end)];
     860%     AxeData.A=A;
     861%     AxeData.AX=[AX(1) AX(end)];
     862%     AxeData.AY=[AY(1) AY(end)];
    863863    test_ima=1;
    864864   
     
    912912       delete(hcol)
    913913    end
    914     AxeData.A=[];
    915     AxeData.AX=[];
    916     AxeData.AY=[];
     914%     AxeData.A=[];
     915%     AxeData.AX=[];
     916%     AxeData.AY=[];
    917917    PlotParamOut=rmfield(PlotParamOut,'Scalar');
    918918end
     
    960960        vec_C=ones(1,numel(vec_X));
    961961    end
    962     AxeData.X=vec_X';
    963     AxeData.Y=vec_Y';
    964     AxeData.U=vec_U';
    965     AxeData.V=vec_V';
    966     AxeData.C=vec_C';
    967     if isempty(ivar_F)
    968         AxeData.F=[];
    969     else
    970         AxeData.F=vec_F';
    971     end
    972     if isempty(ivar_FF)
    973         AxeData.FF=[];
    974     else
    975         AxeData.FF=vec_FF';
    976     end
     962%     AxeData.X=vec_X';
     963%     AxeData.Y=vec_Y';
     964%     AxeData.U=vec_U';
     965%     AxeData.V=vec_V';
     966%     AxeData.C=vec_C';
     967%     if isempty(ivar_F)
     968%         AxeData.F=[];
     969%     else
     970%         AxeData.F=vec_F';
     971%     end
     972%     if isempty(ivar_FF)
     973%         AxeData.FF=[];
     974%     else
     975%         AxeData.FF=vec_FF';
     976%     end
    977977   
    978978    %decimate by a factor 2 in vector mesh(4 in nbre of vectors)
     
    10341034        delete(hvec);
    10351035    end
    1036     AxeData.X=[];
    1037     AxeData.Y=[];
    1038     AxeData.U=[];
    1039     AxeData.V=[];
    1040     AxeData.C=[];
    1041     AxeData.W=[];
    1042     AxeData.F=[];
    1043      AxeData.FF=[];
     1036%     AxeData.X=[];
     1037%     AxeData.Y=[];
     1038%     AxeData.U=[];
     1039%     AxeData.V=[];
     1040%     AxeData.C=[];
     1041%     AxeData.W=[];
     1042%     AxeData.F=[];
     1043%      AxeData.FF=[];
    10441044%     AxeData.Mesh=[];
    10451045    PlotParamOut=rmfield(PlotParamOut,'Vectors');
    10461046end
    1047 if isfield(Data,'Z')
    1048     AxeData.Z=Data.Z;% A REVOIR
    1049 end
     1047% if isfield(Data,'Z')
     1048%     AxeData.Z=Data.Z;% A REVOIR
     1049% end
    10501050listfields={'AY','AX','A','X','Y','U','V','C','W','F','FF'};
    10511051listdim={'AY','AX',{'AY','AX'},'nb_vectors','nb_vectors','nb_vectors','nb_vectors','nb_vectors','nb_vectors','nb_vectors','nb_vectors'};
     
    10531053%ind_select=[];
    10541054nbvar=0;
    1055 AxeData.ListVarName={};
    1056 AxeData.VarDimName={};
    1057 AxeData.VarAttribute={};
    1058 for ilist=1:numel(listfields)
    1059     eval(['testvar=isfield(AxeData,listfields{ilist}) && ~isempty(AxeData.' listfields{ilist} ');'])
    1060     if testvar
    1061         nbvar=nbvar+1;
    1062         AxeData.ListVarName{nbvar}=listfields{ilist};
    1063         AxeData.VarDimName{nbvar}=listdim{ilist};
    1064         AxeData.VarAttribute{nbvar}.Role=Role{ilist};
    1065     end
    1066 end
     1055% AxeData.ListVarName={};
     1056% AxeData.VarDimName={};
     1057% AxeData.VarAttribute={};
     1058% for ilist=1:numel(listfields)
     1059%     eval(['testvar=isfield(AxeData,listfields{ilist}) && ~isempty(AxeData.' listfields{ilist} ');'])
     1060%     if testvar
     1061%         nbvar=nbvar+1;
     1062%         AxeData.ListVarName{nbvar}=listfields{ilist};
     1063%         AxeData.VarDimName{nbvar}=listdim{ilist};
     1064%         AxeData.VarAttribute{nbvar}.Role=Role{ilist};
     1065%     end
     1066% end
    10671067%store the coordinate extrema occupied by the field
    10681068test_lim=0;
  • trunk/src/set_object.m

    r150 r153  
    5656end
    5757% End initialization code - DO NOT PLOT
    58 
    59 %-------------------------------------------------------------------
     58%------------------------------------------------------------------------
     59%------------------------------------------------------------------------
    6060% --- Executes just before set_object is made visible.
    6161%INPUT:
     
    275275varargout{2}=handles;
    276276
    277 %-----------------------------------------------
     277%------------------------------------------------------------------------
    278278% --- Executes on selection change in ObjectStyle.
    279279function ObjectStyle_Callback(hObject, eventdata, handles)
     
    350350set(handles.ObjectStyle,'UserData',style)
    351351
    352 %----------------------------------------------
     352%------------------------------------------------------------------------
    353353function xObject_Callback(hObject, eventdata, handles)
    354354
    355 
     355%------------------------------------------------------------------------
    356356function yObject_Callback(hObject, eventdata, handles)
    357357
    358 
     358%------------------------------------------------------------------------
    359359% --- Executes on selection change in zObject.
    360360function zObject_Callback(hObject, eventdata, handles)
    361 
    362 
    363 
     361%------------------------------------------------------------------------
     362
     363%------------------------------------------------------------------------
    364364% --- Executes on selection change in ProjMode.
    365365function ProjMode_Callback(hObject, eventdata, handles)
     
    464464        end
    465465end
    466 %
    467 % %---------------------------------------------
    468 % % --- Executes on selection change in TITLE.
    469 % function TITLE_Callback(style, handles)
    470 % %---------------------------------------------
    471 % switch style
    472 %     case {'points','line','polyline','plane'}
    473 %         menu_proj={'projection';'interp';'filter';'none'};
    474 %     case {'polygon','rectangle','ellipse'}
    475 %         menu_proj={'inside';'outside';'mask_inside';'mask_outside'};
    476 %     case 'volume'
    477 %         menu_proj={'none'};
    478 % end
    479 %
    480 %
    481 % old_menu=get(handles.ObjectStyle,'String');
    482 % value=get(handles.ObjectStyle,'Value');
    483 % old_style=old_menu{value};
    484 % teststyle=0;
    485 % for iline=1:length(menu_style)
    486 %     if isequal(menu_style{iline},old_style)
    487 %         styleval=iline;
    488 %         teststyle=1;
    489 %         break
    490 %     end
    491 % end
    492 % if ~teststyle
    493 %     new_style=[];%default
    494 %     switch old_style
    495 %         case 'polyline'
    496 %             new_style='polygon';
    497 %         case 'polygon'
    498 %             new_style='polyline';
    499 %     end
    500 %     if ~isempty(new_style)
    501 %         for iline=1:length(menu_style)
    502 %             if isequal(menu_style{iline},new_style)
    503 %                 styleval=iline;
    504 %                 teststyle=1;
    505 %                 break
    506 %             end
    507 %         end
    508 %     end
    509 % end
    510 % if ~teststyle
    511 %     styleval=1;
    512 % end
    513 % set(handles.ObjectStyle,'String',menu_style)
    514 % set(handles.ObjectStyle,'Value',styleval)
    515 % set(handles.ProjMode,'String',menu_proj)
    516 % set(handles.ProjMode,'Value',1)
    517 % ObjectStyle_Callback(hObject, eventdata, handles) 
    518 
    519 %---------------------------------------------
     466%------------------------------------------------------------------------
     467
     468%------------------------------------------------------------------------
    520469function Phi_Callback(hObject, eventdata, handles)
    521470update_slider(hObject, eventdata,handles)
    522 %---------------------------------------------
    523 
     471%------------------------------------------------------------------------
     472%------------------------------------------------------------------------
    524473function Theta_Callback(hObject, eventdata, handles)
    525474update_slider(hObject, eventdata,handles)
    526 
     475%------------------------------------------------------------------------
    527476function update_slider(hObject, eventdata,handles)
    528477%rotation angles
     
    542491    ZMax_Callback(hObject, eventdata, handles)
    543492end
    544 
     493%------------------------------------------------------------------------
    545494function DX_Callback(hObject, eventdata, handles)
    546 
    547 
     495%------------------------------------------------------------------------
     496%------------------------------------------------------------------------
    548497function DY_Callback(hObject, eventdata, handles)
    549 
    550 
     498%------------------------------------------------------------------------
     499%------------------------------------------------------------------------
    551500function DZ_Callback(hObject, eventdata, handles)
    552 
    553 
    554 
     501%------------------------------------------------------------------------
     502
     503%------------------------------------------------------------------------
    555504%-----------------------------------------------------
    556505% --- Executes on button press in OPEN: DESACTIVATED use uvmat browser
     
    740689set(handles.YObject,'String',YObject)
    741690%METTRA A JOUR ASPECT DE L'INTERFACE (COMME set_object_Opening
    742 
     691%------------------------------------------------------------------------
    743692%----------------------------------------------------
    744693% executed when closing: set the parent interface button to value 0
     
    768717end
    769718
    770 %-----------------------------------------------------------------------
     719%------------------------------------------------------------------------
    771720% --- Executes on button press in PLOT: PLOT the defined object and its projected field
    772721function PLOT_Callback(hObject, eventdata, handles)
     
    775724UvData=get(huvmat,'UserData');%Data associated to the GUI uvmat
    776725hhuvmat=guidata(huvmat);%handles in the uvmat GUI
    777 ObjectName=get(handles.TITLE,'String');%name ome)f the current object (set_object na
     726ObjectName=get(handles.TITLE,'String');%name of the current object
    778727ListObject=get(hhuvmat.list_object_1,'String');%position in the objet list
    779728IndexObj_1=get(hhuvmat.list_object_1,'Value');
    780729IndexObj_2=get(hhuvmat.list_object_2,'Value');
    781 
    782 % set(plotfig,'Name',['Projection on' num2str(IndexObj) '-' ObjectData.Style]);
    783730ObjectData=read_set_object(handles);%read the input parameters defining the object in the GUI set_object
    784 PlotHandles=[];%default
    785731testnew=0;
    786732PlotHandles=get_plot_handles(hhuvmat);
     
    791737    projview='uvmat';
    792738elseif IndexObj_2<=numel(ListObject)&& strcmp(ListObject{IndexObj_2},ObjectName)% we are editing the object whose projection is viewed in view_field
    793     hview_field=findobj('tag','view_field');
     739    hview_field=findobj(allchild(0),'tag','view_field');
    794740    if ~isempty(hview_field)
    795741        PlotHandles=guidata(hview_field);
     
    799745    projview='view_field';
    800746else %new object
    801     testnew=1;
    802    
     747    testnew=1; 
    803748    IndexObj=numel(ListObject)+1;
    804     %ObjectName=[num2str(IndexObj) '-' ObjectData.Style];
    805 %     ListObject=[ListObject;ObjectName];
    806 %     set(hhuvmat.list_object_2,'String',[ListObject;ObjectName;{'...'}])
    807 %     set(hhuvmat.list_object_2,'Value',IndexObj)
    808 end
    809 % ObjectName=get(handles.TITLE,'String');
    810 if length(ObjectName)<1
    811     ObjectName=[num2str(IndexObj) '-' ObjectData.Style];
    812 else
    813     for ilist=1:numel(ListObject)
    814         if strcmp(ListObject{ilist},ObjectName)
    815             ObjectName=[num2str(IndexObj) '-' ObjectName];
    816             break
    817         end
    818     end
     749end
     750if length(ObjectName)<1% name of object not defined in set_object
     751    ObjectName=[num2str(IndexObj) '-' ObjectData.Style];%default name
     752elseif ~get(hhuvmat.edit,'Value')%not in edit mode (new object created)
     753    detectname=1;
     754    ObjectNameNew=ObjectName;
     755    vers=0;
     756    while detectname==1 %create a new subdir if the netcdf files already exist
     757        detectname=find(strcmp(ObjectNameNew,ListObject),1)%test the existence of the proposed name in the list
     758        if detectname% if athe object name already exists
     759            indstr=regexp(ObjectNameNew,'\D')
     760            if indstr(end)<length(ObjectNameNew) %object name ends by a number
     761                vers=str2double(ObjectNameNew(indstr(end)+1:end))+1;
     762                ObjectNameNew=[ObjectNameNew(1:indstr(end)) num2str(vers)];
     763            else
     764                vers=vers+1
     765                ObjectNameNew=[ObjectNameNew(1:indstr(end)) '_' num2str(vers)]     
     766            end
     767        end
     768    end
     769    ObjectName=ObjectNameNew;
    819770end
    820771ListObject{IndexObj,1}=ObjectName;
     
    842793UvData.MouseAction='edit_object'; % set the edit button to 'on'
    843794set(huvmat,'UserData',UvData)
    844 
     795%------------------------------------------------------------------------
    845796% --- Executes on button press in MenuCoord.
    846797function MenuCoord_Callback(hObject, eventdata, handles)
    847 
     798%------------------------------------------------------------------------
    848799%----------------------------------------------------
    849800function YMin_Callback(hObject, eventdata, handles)
    850 
     801%------------------------------------------------------------------------
    851802
    852803function ZMin_Callback(hObject, eventdata, handles)
    853 
     804%------------------------------------------------------------------------
    854805
    855806function ZMax_Callback(hObject, eventdata, handles)
     
    862813    set(handles.z_slider,'SliderStep',rel_step)
    863814end
    864 
     815%------------------------------------------------------------------------
    865816function YMax_Callback(hObject, eventdata, handles)
    866 
     817%------------------------------------------------------------------------
    867818
    868819function XMin_Callback(hObject, eventdata, handles)
    869 
     820%------------------------------------------------------------------------
    870821
    871822function XMax_Callback(hObject, eventdata, handles)
    872 
    873 
    874 % ------------------------------------------------------
     823%------------------------------------------------------------------------
     824%------------------------------------------------------------------------
    875825function SAVE_Callback(hObject, eventdata, handles)
    876826% ------------------------------------------------------
     
    914864end
    915865msgbox_uvmat('CONFIRMATION',[answer{1}  ' saved'])
    916 
    917 %---------------------------------------------------------
     866%------------------------------------------------------------------------
     867%------------------------------------------------------------------------
    918868% --- Executes on slider movement.
    919869function z_slider_Callback(hObject, eventdata, handles)
     
    936886set(handles.ZObject,'String',num2str(NormVec_Z*Z_value,4))
    937887PLOT_Callback(hObject, eventdata, handles)
    938 
    939 
     888%------------------------------------------------------------------------
     889%------------------------------------------------------------------------
    940890% --- Executes on button press in HELP.
    941891function HELP_Callback(hObject, eventdata, handles)
     
    948898    web([helpfile '#set_object'])
    949899end
    950 
    951 
    952 
     900%------------------------------------------------------------------------
     901
     902
  • trunk/src/uvmat.m

    r150 r153  
    44284428list_str=get(handles.list_object_2,'String');
    44294429IndexObj=get(handles.list_object_2,'Value');
    4430 if isequal(list_str{IndexObj},'...')
     4430if strcmp(list_str{IndexObj},'...')
    44314431    hview_field=findobj(allchild(0),'Tag','view_field');
    44324432    if ~isempty(hview_field)
     
    44414441%------------------------------------------------------------------------
    44424442UvData=get(handles.uvmat,'UserData');%read UvData properties stored on the uvmat interface
    4443 if ~(length(UvData.Object)>=IndexObj);
     4443if numel(UvData.Object)<IndexObj;
    44444444    return
    44454445end
     
    44634463
    44644464% %project the current field on the object and plot it
    4465 % ProjData= proj_field(UvData.Field,ObjectData,IndexObj);%project the current interface field on ObjectData
    4466 % if option==1%length(UvData.Object)>= IndexObj && isfield(UvData.Object{IndexObj},'plotaxes')&& ishandle(UvData.Object{IndexObj}.plotaxes)
    4467 %     plot_field(ProjData,handles.axes3,PlotHandles);
    4468 %     UvData.Object{IndexObj}.plotaxes=handles.axes3;
    4469 % else
    4470 %     UvData.Object{IndexObj}.plotaxes=view_field(ProjData);
    4471 % end
    4472 % set(handles.uvmat,'UserData',UvData)
     4465ProjData= proj_field(UvData.Field,ObjectData,IndexObj);%project the current interface field on ObjectData
     4466if option==1%length(UvData.Object)>= IndexObj && isfield(UvData.Object{IndexObj},'plotaxes')&& ishandle(UvData.Object{IndexObj}.plotaxes)
     4467    plot_field(ProjData,handles.axes3,PlotHandles);
     4468    UvData.Object{IndexObj}.plotaxes=handles.axes3;
     4469else
     4470    hviewfield=view_field(ProjData);
     4471    hhviewfield=guidata(hviewfield);
     4472    UvData.Object{IndexObj}.plotaxes=hhviewfield.axes3;
     4473end
     4474set(handles.uvmat,'UserData',UvData)
    44734475hother=findobj('Tag','proj_object');%find all the proj objects
    44744476for iobj=1:length(hother)
Note: See TracChangeset for help on using the changeset viewer.