Index: trunk/src/uvmat.m
===================================================================
--- trunk/src/uvmat.m	(revision 309)
+++ trunk/src/uvmat.m	(revision 315)
@@ -932,11 +932,11 @@
 %% view the field  
 run0_Callback(hObject, eventdata, handles); %view field
-mask_test=get(handles.mask_test,'value');
+mask_test=get(handles.CheckMask,'value');
 if mask_test
-    MaskData=get(handles.mask_test,'UserData');
+    MaskData=get(handles.CheckMask,'UserData');
     if isfield(MaskData,'maskhandle') && ishandle(MaskData.maskhandle)
           delete(MaskData.maskhandle)    %delete old mask
     end
-    mask_test_Callback(hObject, eventdata, handles)
+    CheckMask_Callback(hObject, eventdata, handles)
 end
 
@@ -1453,9 +1453,9 @@
 
 %------------------------------------------------------------------------
-% --- Executes on button press in mask_test.
-function mask_test_Callback(hObject, eventdata, handles)
+% --- Executes on button press in CheckMask.
+function CheckMask_Callback(hObject, eventdata, handles)
 %------------------------------------------------------------------------
 %case of view mask selection
-if isequal(get(handles.mask_test,'Value'),1)
+if isequal(get(handles.CheckMask,'Value'),1)
     [FF,RootPath,FileBase]=read_file_boxes(handles);
     num_i1=stra2num(get(handles.i1,'String'));
@@ -1499,6 +1499,6 @@
                 set(handles.nb_slice,'String',Name(i+1:ind_mask-1));
                 set(handles.nb_slice,'BackgroundColor',[1 1 0])
-                set(handles.mask_test,'UserData',Mask);
-                set(handles.mask_test,'BackgroundColor',[1 1 0])
+                set(handles.CheckMask,'UserData',Mask);
+                set(handles.CheckMask,'BackgroundColor',[1 1 0])
                 if nbslice > 1
                     set(handles.slices,'value',1)
@@ -1522,6 +1522,6 @@
         Mask.Base=fullfile(RootDir,RootFile);
         Mask.NbSlice=1;
-        set(handles.mask_test,'UserData',Mask);
-        set(handles.mask_test,'BackgroundColor',[1 1 0])
+        set(handles.CheckMask,'UserData',Mask);
+        set(handles.CheckMask,'BackgroundColor',[1 1 0])
     end
     if isempty(errormsg)
@@ -1529,13 +1529,13 @@
     end
     if ~isempty(errormsg)
-            set(handles.mask_test,'Value',0)
-            set(handles.mask_test,'BackgroundColor',[0.7 0.7 0.7])
+            set(handles.CheckMask,'Value',0)
+            set(handles.CheckMask,'BackgroundColor',[0.7 0.7 0.7])
      end
-else 
-    MaskData=get(handles.mask_test,'UserData');
+else % desactivate mask display
+    MaskData=get(handles.CheckMask,'UserData');
     if isfield(MaskData,'maskhandle') && ishandle(MaskData.maskhandle)
           delete(MaskData.maskhandle)    
     end
-    set(handles.mask_test,'UserData',[])    
+    set(handles.CheckMask,'UserData',[])    
     UvData=get(handles.uvmat,'UserData');
     if isfield(UvData,'MaskName')
@@ -1543,5 +1543,5 @@
         set(handles.uvmat,'UserData',UvData)
     end
-    set(handles.mask_test,'BackgroundColor',[0.7 0.7 0.7])
+    set(handles.CheckMask,'BackgroundColor',[0.7 0.7 0.7])
 end
 
@@ -1550,5 +1550,5 @@
 %------------------------------------------------------------------------
 errormsg=[];%default
-MaskData=get(handles.mask_test,'UserData');
+MaskData=get(handles.CheckMask,'UserData');
 if isfield(MaskData,'maskhandle')&& ishandle(MaskData.maskhandle)
     uistack(MaskData.maskhandle,'top');
@@ -1556,5 +1556,5 @@
 num_i1_mask=mod(num_i1-1,MaskData.NbSlice)+1;
 MaskName=name_generator(MaskData.Base,num_i1_mask,num_j1,'.png',MaskData.NomType);
-huvmat=get(handles.mask_test,'parent');
+huvmat=get(handles.CheckMask,'parent');
 UvData=get(huvmat,'UserData');
 
@@ -1623,5 +1623,5 @@
             MaskData.maskhandle=image(Mask.AX,Mask.AY,imflag,'Tag','mask','HitTest','off','AlphaData',0.6*flagmask);
 %             set(MaskData.maskhandle,'AlphaData',0.6*flagmask)
-            set(handles.mask_test,'UserData',MaskData)
+            set(handles.CheckMask,'UserData',MaskData)
         end
     end
@@ -2556,11 +2556,5 @@
 
 % second projection object (view_field display)
-% IndexObj_2=get(handles.list_object_2,'Value');%selected projection object for the second view
-% if IndexObj_2==0
-%     IndexObj_2=1;
-% end
-%if isequal(get(handles.list_object_2,'Visible'),'on') && IndexObj_2 <= numel(UvData.Object)&& ~isempty(UvData.Object{IndexObj_2})
- if length( IndexObj)>=2
-%      IndexObj(2)=IndexObj_2;
+if length( IndexObj)>=2
     view_field_handle=findobj(allchild(0),'tag','view_field');%handles of the view_field GUI
     if ~isempty(view_field_handle)
@@ -2579,5 +2573,5 @@
     [ObjectData,errormsg]=proj_field(UvData.Field,UvData.Object{iobj});% project field on the object
     if testnewseries && isfield(ObjectData,'CoordUnit')&& isfield(PlotParam{imap},'Coordinates')
-        PlotParam{imap}=rmfield(PlotParam{imap}.Coordinates,'CheckFixEqual'); %set FixEqual to depend on the field (=1 if Data.CoordUnit=1 in plot_field)
+        PlotParam{imap}.Coordinates=rmfield(PlotParam{imap}.Coordinates,'CheckFixEqual'); %set FixEqual to depend on the field (=1 if Data.CoordUnit=1 in plot_field)
     end 
     if ~isempty(errormsg)
@@ -2651,5 +2645,5 @@
 
 %% update the mask
-if isequal(get(handles.mask_test,'Value'),1)%if the mask option is on
+if isequal(get(handles.CheckMask,'Value'),1)%if the mask option is on
    update_mask(handles,num_i1,num_i2);
 end
@@ -3818,5 +3812,5 @@
      UvData.Object=UvData.Object(1);
 end 
-list_object=get(handles.ListObject,'String');
+%list_object=get(handles.ListObject,'String');
 set(handles.ListObject,'Value',1)
 set(handles.ListObject,'String',{''})
@@ -3826,5 +3820,5 @@
 
 %delete mask if it is displayed 
-if isequal(get(handles.mask_test,'Value'),1)%if the mask option is on
+if isequal(get(handles.CheckMask,'Value'),1)%if the mask option is on
    UvData=rmfield(UvData,'MaskName'); %will impose mask refresh  
 end
@@ -3832,5 +3826,5 @@
 run0_Callback(hObject, eventdata, handles)
 
-%--------------------------------------------
+%------------------------------------------------------------------------
 function histo1_menu_Callback(hObject, eventdata, handles)
 %--------------------------------------------
@@ -3842,7 +3836,7 @@
 update_histo(handles.histo_u,huvmat,FieldName)
 
-%----------------------------------------------
+%------------------------------------------------------------------------
 function histo2_menu_Callback(hObject, eventdata, handles)
-%----------------------------------------------
+%------------------------------------------------------------------------
 %plot second histo
 huvmat=get(handles.histo2_menu,'parent');
@@ -3852,8 +3846,8 @@
 update_histo(handles.histo_v,huvmat,FieldName)
 
-
-%--------------------------------------------
+%------------------------------------------------------------------------
 %read the field .Fieldname stored in UvData and plot its histogram
 function update_histo(haxes,huvmat,FieldName)
+%------------------------------------------------------------------------
 UvData=get(huvmat,'UserData');
 if ~isfield(UvData.Field,FieldName)
@@ -4108,15 +4102,15 @@
 list=get(handles.ListColorCode,'String');
 ichoice=get(handles.ListColorCode,'Value');
-colcode.ColorCode=list{ichoice};
-colcode.MinC=str2num(get(handles.num_MinVec,'String'));
-colcode.MaxC=str2num(get(handles.num_MaxVec,'String'));
-test3color=strcmp(colcode.ColorCode,'rgb') || strcmp(colcode.ColorCode,'bgr');
+colcode.ListColorCode=list{ichoice};
+colcode.MinVec=str2num(get(handles.num_MinVec,'String'));
+colcode.MaxVec=str2num(get(handles.num_MaxVec,'String'));
+test3color=strcmp(colcode.ListColorCode,'rgb') || strcmp(colcode.ListColorCode,'bgr');
 if test3color
-    colcode.colcode1=str2num(get(handles.num_ColCode1,'String'));
-    colcode.colcode2=str2num(get(handles.num_ColCode2,'String'));
-end
-colcode.FixedCbounds=0;
-colcode.FixedCbounds=1;
-vec_C=colcode.MinC+(colcode.MaxC-colcode.MinC)*(0.5:width-0.5)/width;%sample of vec_C values from min to max
+    colcode.ColCode1=str2num(get(handles.num_ColCode1,'String'));
+    colcode.ColCode2=str2num(get(handles.num_ColCode2,'String'));
+end
+% colcode.FixedCbounds=0;
+%colcode.CheckFixVecColor=1;
+vec_C=colcode.MinVec+(colcode.MaxVec-colcode.MinVec)*(0.5:width-0.5)/width;%sample of vec_C values from min to max
 [colorlist,col_vec]=set_col_vec(colcode,vec_C);
 oneheight=ones(1,height);
@@ -4138,7 +4132,7 @@
 write_plot_param(handles,PlotParamOut); %update the auto plot parameters
 
-%-------------------------------------------------------------------
-% --- Executes on button press in grid.
-function grid_Callback(hObject, eventdata, handles)
+% %-------------------------------------------------------------------
+% % --- Executes on button press in grid.
+% function grid_Callback(hObject, eventdata, handles)
 
 
