Index: trunk/src/series/civ_input.m
===================================================================
--- trunk/src/series/civ_input.m	(revision 1147)
+++ trunk/src/series/civ_input.m	(revision 1148)
@@ -67,21 +67,4 @@
 
 %% set visibility options depending on the calling function (Param.Action.ActionName): 
-if strcmp(Param.Action.ActionName,'civ_series')||strcmp(Param.Action.ActionName,'stereo_civ')
-     set(handles.num_MaxDiff,'Visible','on')
-    set(handles.num_MaxVel,'Visible','on')
-    set(handles.title_MaxVel,'Visible','on')
-    set(handles.title_MaxDiff,'Visible','on')
-    set(handles.num_Nx,'Visible','off')
-    set(handles.num_Ny,'Visible','off')
-    set(handles.title_Nx,'Visible','off')
-    set(handles.title_Ny,'Visible','off')
-    set(handles.num_CorrSmooth,'Style','popupmenu')
-    set(handles.num_CorrSmooth,'Value',1)
-    set(handles.num_CorrSmooth,'String',{'1';'2'})
-    set(handles.CheckThreshold,'Visible','on')
-    set(handles.CheckDeformation,'Value',0)% desactivate 
-%     set(handles.num_SubDomainSize(1),'String','250')
-%     set(handles.num_SubDomainSize(2),'String','500')
-end
 switch Param.Action.ActionName
     case 'stereo_civ'
@@ -91,4 +74,13 @@
         set(handles.ListCompareMode,'Visible','on')
         set(handles.PairIndices,'Visible','on')
+    case 'civ_3D'
+        set(handles.ListCompareMode,'Visible','on')
+        set(handles.PairIndices,'Visible','on')
+        set(handles.title_z,'Visible','on')
+        set(handles.num_CorrBoxSize_3,'Visible','on')
+        set(handles.num_SearchBoxSize_3,'Visible','on')
+        set(handles.num_SearchBoxShift_3,'Visible','on')
+        set(handles.num_Dz,'Visible','on')
+        set(handles.title_Dz,'Visible','on')
 end
 
@@ -157,12 +149,4 @@
         end
 end
-
-%% reinitialise menus
-set(handles.ListPairMode,'Value',1)
-set(handles.ListPairMode,'String',{''})
-set(handles.ListPairCiv1,'Value',1)
-set(handles.ListPairCiv1,'String',{''})
-set(handles.ListPairCiv2,'Value',1)
-set(handles.ListPairCiv2,'String',{''}) 
         
 %% prepare the GUI with input parameters 
@@ -321,6 +305,14 @@
 end
 
+%% reinitialise pair menus
+set(handles.ListPairMode,'Value',1)
+set(handles.ListPairMode,'String',{''})
+set(handles.ListPairCiv1,'Value',1)
+set(handles.ListPairCiv1,'String',{''})
+set(handles.ListPairCiv2,'Value',1)
+set(handles.ListPairCiv2,'String',{''}) 
+
 %% set the menu and default choice of civ pairs
-if isequal(MaxIndex_j,MinIndex_j)% no possibility of j pairs
+if isequal(MaxIndex_j,MinIndex_j)|| strcmp(Param.Action.ActionName,'civ_3D')% no possibility of j pairs
     PairMenu={'series(Di)'};
 elseif MaxIndex_j-MinIndex_j==1
@@ -338,22 +330,26 @@
     PairIndex=find(strcmp(Param.ActionInput.PairIndices.ListPairMode,PairMenu));%retrieve the previous option
 end
-if isempty(PairIndex)
-    if ~isfield(Param.IndexRange,'first_j')||isequal(MaxIndex_j,MinIndex_j)% no possibility of j pairs
-        PairIndex=1;
-    elseif  MaxIndex_i==1 && MaxIndex_j>1% simple series in j
-        if  MaxIndex_j <= 10
-            PairIndex=1;% advice 'pair j1-j2' except in MaxIndex_j is large
-        end
-    else
-        if strcmp(NomTypeNc,'_1-2_1')
-            PairIndex=3;% advise 'series(Di)'
-        elseif  MaxIndex_j <= 10
-            PairIndex=1;% advice 'pair j1-j2' except in MaxIndex_j is large
+if strcmp(Param.Action.ActionName,'civ_3D')
+    PairIndex=1
+else
+    if isempty(PairIndex)
+        if ~isfield(Param.IndexRange,'first_j')||isequal(MaxIndex_j,MinIndex_j)% no possibility of j pairs
+            PairIndex=1;
+        elseif  MaxIndex_i==1 && MaxIndex_j>1% simple series in j
+            if  MaxIndex_j <= 10
+                PairIndex=1;% advice 'pair j1-j2' except in MaxIndex_j is large
+            end
         else
-            PairIndex=2;% advice 'Dj' 
-        end
-    end
-end
-set(handles.ListPairMode,'Value',PairIndex);  
+            if strcmp(NomTypeNc,'_1-2_1')
+                PairIndex=3;% advise 'series(Di)'
+            elseif  MaxIndex_j <= 10
+                PairIndex=1;% advice 'pair j1-j2' except in MaxIndex_j is large
+            else
+                PairIndex=2;% advice 'Dj'
+            end
+        end
+    end
+end
+set(handles.ListPairMode,'Value',PairIndex);
 
 %% indicate the min and max indices i and j on the GUI
@@ -407,6 +403,6 @@
 %% Civ1 parameters
 %Param.CheckCiv1=1;
-Param.Civ1.CorrBoxSize=[25 25];
-Param.Civ1.SearchBoxSize=[55 55];
+Param.Civ1.CorrBoxSize=[25 25 1];
+Param.Civ1.SearchBoxSize=[55 55 5];
 Param.Civ1.SearchBoxShift=[0 0];
 Param.Civ1.CorrSmooth=1;
@@ -420,15 +416,11 @@
 
 %% Fix1 parameters
-%Param.CheckFix1=1;
-Param.Fix1.CheckFmin2=1;
-Param.Fix1.CheckF3=1;
 Param.Fix1.MinCorr=0.2000;
 
 %% Patch1 parameters
 %Param.CheckPatch1=1;
-Param.Patch1.FieldSmooth=10;
-Param.Patch1.MaxDiff=1.5000;
-Param.Patch1.SubDomainSize=250;
-Param.Patch1.TestPatch1=0;
+Param.Patch1.FieldSmooth=20;
+Param.Patch1.MaxDiff=2;
+Param.Patch1.SubDomainSize=125;
 
 %% Civ2 parameters
@@ -443,18 +435,12 @@
 Param.Civ2.Mask='';
 Param.Civ2.CheckThreshold=0;
-Param.Civ2.TestCiv2=0;
 
 %% Fix2 parameters
-%Param.CheckFix2=1;
-Param.Fix2.CheckFmin2=1;
-Param.Fix2.CheckF4=1;
-Param.Fix2.CheckF3=1;
 Param.Fix2.MinCorr=0.2000;
 
 %% Patch2 parameters
-%Param.CheckPatch2=1;
-Param.Patch2.FieldSmooth=2;
+Param.Patch2.FieldSmooth=5;
 Param.Patch2.MaxDiff=1.5000;
-Param.Patch2.SubDomainSize=500;
+Param.Patch2.SubDomainSize=250;
 Param.Patch2.TestPatch2=0;
 
@@ -611,5 +597,5 @@
     checkeven=(mod(ActionInput.Civ1.CorrBoxSize,2)==0);
     ActionInput.Civ1.CorrBoxSize(checkeven)=ActionInput.Civ1.CorrBoxSize(checkeven)+1;% set correlation box sizes to odd values
-    ActionInput.Civ1.SearchBoxSize=max(ActionInput.Civ1.SearchBoxSize,ActionInput.Civ1.CorrBoxSize+8);% insure that the search box size is large enough
+    ActionInput.Civ1.SearchBoxSize(1:2)=max(ActionInput.Civ1.SearchBoxSize(1:2),ActionInput.Civ1.CorrBoxSize(1:2)+8);% insure that the search box size is large enough
     checkeven=(mod(ActionInput.Civ1.SearchBoxSize,2)==0);
     ActionInput.Civ1.SearchBoxSize(checkeven)=ActionInput.Civ1.SearchBoxSize(checkeven)+1;% set search box sizes to odd values
@@ -669,9 +655,9 @@
     case 'PIV'
         PairIndices='on';% needs to define index pairs for PIV       
-    case 'PIV volume'
-        PairIndices='on';% needs to define index pairs for PIV
-        set(handles.ListPairMode,'Value',1)
-        set(handles.ListPairMode,'String',{'series(Di)'})
-        ListPairMode_Callback(hObject, eventdata, handles)
+    % case 'PIV volume'
+    %     PairIndices='on';% needs to define index pairs for PIV
+    %     set(handles.ListPairMode,'Value',1)
+    %     set(handles.ListPairMode,'String',{'series(Di)'})
+    %     ListPairMode_Callback(hObject, eventdata, handles)
     case 'displacement'
         OriginIndex='on';%define a frame origin for displacement
@@ -2363,2 +2349,18 @@
     drawnow
 end
+
+
+function num_CorrBoxSize_3_Callback(hObject, eventdata, handles)
+
+
+function num_SearchBoxSize_3_Callback(hObject, eventdata, handles)
+
+
+function MinIndex_j_Callback(hObject, eventdata, handles)
+
+
+% --- Executes on selection change in field_ref2.
+function field_ref2_Callback(hObject, eventdata, handles)
+
+
+
