Index: trunk/src/civ.m
===================================================================
--- trunk/src/civ.m	(revision 469)
+++ trunk/src/civ.m	(revision 476)
@@ -356,5 +356,5 @@
     elseif ~isempty(Data.absolut_time_T0')% case of  civx data,
         set(handles.Program,'Value',1) %select Cix by default
-        ListProgram_Callback([],[], handles)
+        Program_Callback([],[], handles)
         if ~isempty(Data.fix2)
             ind_opening=5;
@@ -423,5 +423,5 @@
 set(handles.RootFile,'String',RootFile)
 if strcmp(ExtInput,'.nc')
-    SubDirCiv=regexprep(SubDir,[SuddirImages '^'],'');%suppress the root  SuddirImages;
+    SubDirCiv=regexprep(SubDir,[SubdirImages '^'],'');%suppress the root  SuddirImages;
 else
     SubDirCiv= '.civ';
@@ -449,5 +449,5 @@
 
 %% look for an image documentation file
-XmlFileName=find_imadoc(RootPath,SubDir,RootFile,FileExt);
+XmlFileName=find_imadoc(RootPath,SubDir,RootFile,ImaExt);
 % SubDirBase=regexprep(SubDir,'\..*','');%take the root part of SubDir, before the first dot '.'
 % filexml=fullfile(RootPath,[SubDirBase '.xml']);% new convention: xml above the image dir
@@ -482,11 +482,11 @@
     [XmlData,warntext]=imadoc2struct(XmlFileName);
     nom_type_read=[];
-    if isfield(XmlData,'Heading')&&isfield(XmlData.Heading','ImageName')&&ischar(XmlData.Heading.ImageName)% get image nom type and extension from the xml file
-        [~,tild,tild,tild,tild,tild,tild,tild,nom_type_read]=fileparts_uvmat(XmlData.Heading.ImageName);
-        fullname=fullfile(fileparts(RootName),XmlData.Heading.ImageName); %full name (including path) of the first image defined by the xmle file,
-        if ~exist(fullname,'file')
-            msgbox_uvmat('WARNING',['FirstImage ' fullname ' defined in the xml file does not exist'])
-        end
-    end
+%     if isfield(XmlData,'Heading')&&isfield(XmlData.Heading','ImageName')&&ischar(XmlData.Heading.ImageName)% get image nom type and extension from the xml file
+%         [~,tild,tild,tild,tild,tild,tild,tild,nom_type_read]=fileparts_uvmat(XmlData.Heading.ImageName);
+%         fullname=fullfile(fileparts(RootName),XmlData.Heading.ImageName); %full name (including path) of the first image defined by the xmle file,
+%         if ~exist(fullname,'file')
+%             msgbox_uvmat('WARNING',['FirstImage ' fullname ' defined in the xml file does not exist'])
+%         end
+%     end
     if isfield(XmlData,'Time') && ~isempty(XmlData.Time)
         time=XmlData.Time;
@@ -1183,6 +1183,6 @@
     end
     if Param.CheckCiv2
-        [Param.Civ2.FileTypeA,FileInfoA_civ2,Param.Civ2.ImageA]=get_file_type(filecell.ima1.civ2{1});
-        [Param.Civ2.FileTypeB,FileInfoB_civ2,Param.Civ2.ImageB]=get_file_type(filecell.ima2.civ2{1});
+        [Param.Civ2.FileTypeA,ImageInfoA_civ2,Param.Civ2.ImageA]=get_file_type(filecell.ima1.civ2{1});
+        [Param.Civ2.FileTypeB,ImageInfoB_civ2,Param.Civ2.ImageB]=get_file_type(filecell.ima2.civ2{1});
     end
 % end
@@ -1206,6 +1206,5 @@
 
         if Param.CheckCiv1
-            % read image-dependent parameters
-            
+            % read image-dependent parameters          
             if ~checkframe% && size(time,1)>=i2_civ1(ifile) && size(time,2)>=j2_civ1(j)
                 Param.Civ1.Dt=(time(i2_civ1(ifile)+1,j2_civ1(j)+1)-time(i1_civ1(ifile)+1,j1_civ1(j)+1));
@@ -1220,7 +1219,7 @@
             Param.Civ1.ImageA=filecell.ima1.civ1{ifile,j};
             Param.Civ1.ImageB=filecell.ima2.civ1{ifile,j};
-            Param.Civ1.ImageBitDepth=FileInfoA_civ1.BitDepth;
-            Param.Civ1.ImageWidth=FileInfoA_civ1.Width;
-            Param.Civ1.ImageHeight=FileInfoA_civ1.Height;
+            Param.Civ1.ImageBitDepth=ImageInfoA_civ1.BitDepth;
+            Param.Civ1.ImageWidth=ImageInfoA_civ1.Width;
+            Param.Civ1.ImageHeight=ImageInfoA_civ1.Height;
             Param.Civ1.FrameIndexA=i1_civ1(ifile);
             Param.Civ1.FrameIndexB=i2_civ1(ifile);
@@ -1294,7 +1293,7 @@
             end
 
-            Param.Civ2.ImageBitDepth=FileInfoA_civ2.BitDepth;
-            Param.Civ2.ImageWidth=FileInfoA_civ2.Width;
-            Param.Civ2.ImageHeight=FileInfoA_civ2.Height;
+            Param.Civ2.ImageBitDepth=ImageInfoA_civ2.BitDepth;
+            Param.Civ2.ImageWidth=ImageInfoA_civ2.Width;
+            Param.Civ2.ImageHeight=ImageInfoA_civ2.Height;
             Param.Civ2.FrameIndexA=i1_civ2(ifile);
             Param.Civ2.FrameIndexB=i2_civ2(ifile);           
@@ -1499,5 +1498,6 @@
             else
                 for p=1:length(batch_file_list)
-                    fid=fopen( batch_file_list{p});
+%                     civ_matlab([batch_file_list{p} '.xml'], [batch_file_list{p} '.nc'])
+                    fid=fopen(batch_file_list{p});
                     eval(fscanf(fid,'%s'));
                     fclose(fid);
