Skip to content

Commit af60784

Browse files
author
HongKee Moon
committed
Revert "Used sigma = 2 for gaussian blur"
This reverts commit ea62947.
1 parent d032218 commit af60784

File tree

2 files changed

+2
-15
lines changed

2 files changed

+2
-15
lines changed

src/main/java/spim/algorithm/DefaultAntiDrift.java

Lines changed: 1 addition & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,6 @@
11
package spim.algorithm;
22

33
import ij.ImageStack;
4-
import ij.plugin.filter.Convolver;
5-
import ij.plugin.filter.GaussianBlur;
6-
import ij.plugin.filter.RankFilters;
74
import ij.process.*;
85
import org.apache.commons.math3.geometry.euclidean.threed.Vector3D;
96

@@ -21,14 +18,6 @@ public class DefaultAntiDrift extends AbstractAntiDrift
2118
*/
2219
private final double sigma;
2320
private final AntiDrift.Type type;
24-
private final GaussianBlur gaussianBlur = new GaussianBlur();
25-
private final Convolver convolver = new Convolver();
26-
private final RankFilters filters = new RankFilters();
27-
private final float[] kernel = new float[]{-1, -1, -1, -1, -1,
28-
-1, -1, -1, -1, -1,
29-
-1, -1, 24, -1, -1,
30-
-1, -1, -1, -1, -1,
31-
-1, -1, -1, -1, -1,};
3221

3322
public DefaultAntiDrift(double sigmaValue)
3423
{
@@ -60,16 +49,14 @@ public void reset()
6049
@Override public void addXYSlice( ImageProcessor ip )
6150
{
6251
ImageProcessor copy = ip.duplicate();
63-
gaussianBlur.blurGaussian( copy, sigma );
64-
convolver.convolve( copy, kernel, 5, 5 );
65-
filters.rank( copy, 2, 2 );
6652

6753
switch (type) {
6854
case CenterOfMass:
6955
if(stack == null) stack = new ImageStack( ip.getWidth(), ip.getHeight() );
7056
stack.addSlice( copy );
7157
break;
7258
case PhaseCorrelation:
59+
copy.blurGaussian( sigma );
7360
latest.addXYSlice( copy );
7461
break;
7562
}

src/main/java/spim/ui/view/component/MMAcquisitionEngine.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -381,7 +381,7 @@ private void runNormalSmartImagingMMAcq(SPIMSetup setup, final Studio frame, Dat
381381
if(toogleGroupValue.equals("Centre of mass")) {
382382
driftCompMap.put(positionItem, new DefaultAntiDrift());
383383
} else if(toogleGroupValue.equals("Phase correlation")) {
384-
driftCompMap.put(positionItem, new DefaultAntiDrift(2));
384+
driftCompMap.put(positionItem, new DefaultAntiDrift(10));
385385
}
386386
}
387387
}

0 commit comments

Comments
 (0)