Index: /trunk/src/geometry_calib.m
===================================================================
--- /trunk/src/geometry_calib.m	(revision 206)
+++ /trunk/src/geometry_calib.m	(revision 207)
@@ -254,6 +254,7 @@
         end     
         GeometryCalib.SliceCoord=Z_plane'*[0 0 1];
+        GeometryCalib.SliceAngle=answer{7}*ones(GeometryCalib.NbSlice,1)*[0 1 0];%rotation around y axis (to generalise)
         GeometryCalib.InterfaceCoord=[0 0 str2double(answer{3})];
-        GeometryCalib.RefractionIndex=str2double(answer{4});
+        GeometryCalib.RefractionIndex=str2double(answer{4});     
     end
     errormsg=update_imadoc(GeometryCalib,outputfile);% introduce the calibration data in the xml file
Index: /trunk/src/imadoc2struct.m
===================================================================
--- /trunk/src/imadoc2struct.m	(revision 206)
+++ /trunk/src/imadoc2struct.m	(revision 207)
@@ -117,5 +117,5 @@
     if length(uid_subtree)==1
         subt=branch(t,uid_subtree);%subtree under GeometryCalib
-       [s.TranslationMotor,errormsg]=read_subtree(subt,{'Nbslice','ZStart','ZEnd'},[1 1 1],[1 1 1])
+       [s.TranslationMotor,errormsg]=read_subtree(subt,{'Nbslice','ZStart','ZEnd'},[1 1 1],[1 1 1]);
     end 
 end
@@ -207,11 +207,9 @@
                     tsai.SliceCoord=ones(NbSlice,1)*tsai.SliceCoord+DZ*(0:NbSlice-1)'*[0 0 1];
                 end
-            end
-            uid_VolumeScan=find(subt,'/GeometryCalib/VolumeScan');
-            if ~isempty(uid_VolumeScan)
-                tsai.VolumeScan=get(subt,children(subt,uid_VolumeScan),'value');
-            end
-            tsai.InterfaceCoord=get_value(subt,'/GeometryCalib/InterfaceCoord',[0 0 0])
-            tsai.RefractionIndex=get_value(subt,'/GeometryCalib/RefractionIndex',1)
+            end   
+            tsai.SliceAngle=get_value(subt,'/GeometryCalib/SliceAngle',[0 0 0]);
+            tsai.VolumeScan=get_value(subt,'/GeometryCalib/VolumeScan','n');
+            tsai.InterfaceCoord=get_value(subt,'/GeometryCalib/InterfaceCoord',[0 0 0]);
+            tsai.RefractionIndex=get_value(subt,'/GeometryCalib/RefractionIndex',1);
             
             if strcmp(option,'GeometryCalib')
@@ -236,15 +234,15 @@
 s=[];%default
 errormsg='';
-head_element=get(subt,1,'name')
+head_element=get(subt,1,'name');
     cont=get(subt,1,'contents');
     if ~isempty(cont)
         for ilist=1:length(Data)
-            uid_key=find(subt,[head_element '/' Data{ilist}])
+            uid_key=find(subt,[head_element '/' Data{ilist}]);
             if ~isequal(length(uid_key),NbOccur(ilist))
-                errormsg=['wrong number of occurence for ' Data{ilist}]
+                errormsg=['wrong number of occurence for ' Data{ilist}];
                 return
             end
             for ival=1:length(uid_key)
-                val=get(subt,children(subt,uid_key(ival)),'value')
+                val=get(subt,children(subt,uid_key(ival)),'value');
                 if ~NumTest(ilist)
                     eval(['s.' Data{ilist} '=val;']);
@@ -279,4 +277,6 @@
            if ~isempty(val_read)
                val=val_read;
+           else
+              val=get(t,uid_child,'value');%char string data
            end
        end
Index: /trunk/src/mouse_motion.m
===================================================================
--- /trunk/src/mouse_motion.m	(revision 206)
+++ /trunk/src/mouse_motion.m	(revision 207)
@@ -103,5 +103,5 @@
                         text_displ_4='';
                         for icell=1:numel(CellVarIndex)%look for all physical fields
-                            if NbDim(icell)==2 % select 2D field
+                            if NbDim(icell)>=2 % select 2D field
                                 if  isfield(Field,'Mesh') && ~isempty(Field.Mesh)&& ~isempty(VarType{icell}.coord_x) && ~isempty(VarType{icell}.coord_y)%case of unstructured data
                                     eval(['X=Field.' Field.ListVarName{VarType{icell}.coord_x} ';'])
@@ -169,8 +169,27 @@
 %                     end
                     if strcmp(text_displ_1,'')
-                        text_displ_1=['x=' num2str(xy(1,1),3) ',y=' num2str(xy(1,2),3) ','];
-                    end
-                    if isfield(Field,'PlaneCoord') && isfield(Field,'ZIndex')
-                        text_displ_1=[text_displ_1 ' z=' num2str(Field.PlaneCoord(Field.ZIndex,3))]; %TODO: generaliser au cas avec angle
+                        text_displ_1=['x=' num2str(xy(1,1),3) ',y=' num2str(xy(1,2),3) ','];  
+                        z=[];
+                        if isfield(Field,'PlaneCoord') && isfield(Field,'ZIndex')
+                            ZIndex=Field.ZIndex;
+                            if size(Field.PlaneCoord)>=[ZIndex 3]
+                            z=Field.PlaneCoord(ZIndex,3);
+                            if isfield(Field,'PlaneAngle')
+                                om=norm(Field.PlaneAngle(ZIndex,:));%norm of rotation angle in radians
+                                OmAxis=Field.PlaneAngle(ZIndex,:)/om; %unit vector marking the rotation axis
+                                cos_om=cos(pi*om/180);
+                                sin_om=sin(pi*om/180);
+                                coeff=OmAxis(3)*(1-cos_om);
+                                norm_plane(1)=OmAxis(1)*coeff+OmAxis(2)*sin_om;
+                                norm_plane(2)=OmAxis(2)*coeff-OmAxis(1)*sin_om;
+                                norm_plane(3)=OmAxis(3)*coeff+cos_om;
+                                Z0=norm_plane*Field.PlaneCoord(ZIndex,:)'/norm_plane(3);
+                                z=Z0-norm_plane(1)*xy(1,1)/norm_plane(3)-norm_plane(2)*xy(1,2)/norm_plane(3);
+                            end
+                            end
+                        end
+                        if ~isempty(z)
+                            text_displ_1=[text_displ_1 ' z=' num2str(z,3)]; %TODO: generaliser au cas avec angle
+                        end
                     end
                     %coordinate transform if proj_coord differs from menu_coord A REVOIR
