@@ -48,6 +48,7 @@ public void run(String arg) {
4848 int [] xymax ;
4949 String sTitle ;
5050 String sImTitle ;
51+ String sInTitle ;
5152 ImageStack crosscorrstack ;
5253 int [][] xydrifttable ;
5354 boolean bAutoCorr =false ;
@@ -78,6 +79,7 @@ else if (imp.getType() != ImagePlus.GRAY8 && imp.getType() != ImagePlus.GRAY16 &
7879 IJ .log ("Only one image in stack, limiting choice to autocorrelation" );
7980 bAutoCorr =true ;
8081 }
82+ sInTitle = imp .getTitle ();
8183
8284 if (!x2Dialog (bAutoCorr ))
8385 return ;
@@ -101,7 +103,7 @@ else if (imp.getType() != ImagePlus.GRAY8 && imp.getType() != ImagePlus.GRAY16 &
101103 if (sChoice .equals ("consecutive images" ))
102104 {
103105 sImTitle =sImTitle +sChoice ;
104- sImTitle = sImTitle +"_delay_" +Integer .toString (nImNumber );
106+ sImTitle = sImTitle +"_delay_" +Integer .toString (nImNumber )+ "_" + sInTitle ;
105107 if (bDrift )
106108 {
107109 xydrifttable [0 ][0 ]=0 ;
@@ -162,8 +164,9 @@ else if (imp.getType() != ImagePlus.GRAY8 && imp.getType() != ImagePlus.GRAY16 &
162164 //current image in stack and all others
163165 if (sChoice .equals ("current image in stack and all others" ))
164166 {
165- sImTitle = sImTitle + "vs_current_image" ;
167+
166168 i =imp .getCurrentSlice ();
169+ sImTitle =sImTitle +"vs_frame" +Integer .toString (i )+"_" +sInTitle ;
167170 ip1 =getFloatversion (imp );
168171 //subtract average intensity value
169172 ip1 .subtract (ImageStatistics .getStatistics (ip1 ,Measurements .MEAN ,null ).mean );
@@ -205,7 +208,7 @@ else if (imp.getType() != ImagePlus.GRAY8 && imp.getType() != ImagePlus.GRAY16 &
205208 //autocorrelation
206209 if (sChoice .equals ("autocorrelation" ))
207210 {
208- sImTitle =sImTitle +"autocorrelation_" ;
211+ sImTitle =sImTitle +"autocorrelation_" + sInTitle ;
209212
210213 //i=imp.getCurrentSlice();
211214 //ip1=getFloatversion(imp);
@@ -223,7 +226,8 @@ else if (imp.getType() != ImagePlus.GRAY8 && imp.getType() != ImagePlus.GRAY16 &
223226 {ip = x2D .calcFFTCorrelationImage (ip2 , ip2 );}
224227
225228 sTitle = String .format ("corr_%d_x_%d" , j ,j );
226- xymax = getmaxpositions (ip );
229+ xymax = getmaxpositionscenterlimit (ip );
230+ //xymax = getmaxpositions(ip);
227231
228232 ptable .incrementCounter ();
229233 ptable .addLabel (sTitle );
@@ -299,7 +303,7 @@ public boolean x2Dialog(boolean bAutoOn)
299303 else
300304 { x2DDial .addRadioButtonGroup ("Calculate 2D cross correlation between:" , items , 3 , 1 , Prefs .get ("Correlescence.2Dcorr" , "consecutive images" ));}
301305
302- x2DDial .addNumericField ("for consecutive, distance between images" , Prefs .get ("Correlescence.2Ddist" , 1 ), 0 , 4 , " " );
306+ x2DDial .addNumericField ("for consecutive, interval between images" , Prefs .get ("Correlescence.2Ddist" , 1 ), 0 , 4 , "frames (or slices) " );
303307 x2DDial .addChoice ("Calculation method:" , itemsC , Prefs .get ("Correlescence.2Dcorrmethod" , "FFT cross-correlation (fast)" ));
304308
305309 x2DDial .addCheckbox ("Correct drift (max of corr)?" , Prefs .get ("Correlescence.2Ddrift" , false ));
0 commit comments