Index: trunk/src/transform_field/ima_filter.m
===================================================================
--- trunk/src/transform_field/ima_filter.m	(revision 1078)
+++ trunk/src/transform_field/ima_filter.m	(revision 1081)
@@ -60,11 +60,19 @@
 Mfiltre=Mfiltre/(sum(sum(Mfiltre)));%normalize filter
 
-Atype=class(DataIn.A);% detect integer 8 or 16 bits
-if numel(size(DataIn.A))==3
-    DataOut.A=filter2(Mfiltre,sum(DataIn.A,3));%filter the input image, after summation on the color component (for color images)
-    DataOut.A=uint16(DataOut.A); %transform to 16 bit images
-else
-    DataOut.A=filter2(Mfiltre,DataIn.A);
-    DataOut.A=feval(Atype,DataOut.A);%transform to the initial image format
+[CellInfo,NbDim,errormsg]=find_field_cells(DataIn)
+for icell=1:numel(CellInfo)
+    if isfield(CellInfo{icell},'CoordType')&& strcmp(CellInfo{icell}.CoordType,'grid')
+        for ivar=1:numel(CellInfo{icell}.VarIndex)
+            VarName=DataIn.ListVarName{CellInfo{icell}.VarIndex(ivar)};
+            Atype=class(DataIn.(VarName));% detect integer 8 or 16 bits
+            if numel(size(DataIn.(VarName)))==3
+                DataOut.(VarName)=filter2(Mfiltre,sum(DataIn.(VarName),3));%filter the input image, after summation on the color component (for color images)
+                DataOut.(VarName)=uint16(DataOut.(VarName)); %transform to 16 bit images
+            else
+                DataOut.(VarName)=filter2(Mfiltre,DataIn.(VarName));
+                DataOut.(VarName)=feval(Atype,DataOut.(VarName));%transform to the initial image format
+            end
+        end
+    end
 end
  
Index: trunk/src/transform_field/phys_polar.m
===================================================================
--- trunk/src/transform_field/phys_polar.m	(revision 1078)
+++ trunk/src/transform_field/phys_polar.m	(revision 1081)
@@ -444,5 +444,5 @@
     siz=size(A{icell});
     checkuint8=isa(A{icell},'uint8');%check for image input with 8 bits
-    checkuint16=isa(A{icell},'uint8');%check for image input with 16 bits
+    checkuint16=isa(A{icell},'uint16');%check for image input with 16 bits
     A{icell}=double(A{icell});
     if numel(siz)==2 %(B/W images)
