Skip to content

Commit 41b8986

Browse files
committed
Remove useless method.
1 parent cc2e5b1 commit 41b8986

2 files changed

Lines changed: 14 additions & 19 deletions

File tree

src/main/java/fiji/plugin/trackmate/tracking/kdtree/NearestNeighborTracker.java

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,6 @@
4545
import fiji.plugin.trackmate.SpotCollection;
4646
import fiji.plugin.trackmate.tracking.SpotTracker;
4747
import fiji.plugin.trackmate.util.Threads;
48-
import fiji.plugin.trackmate.util.TMUtils;
4948
import net.imglib2.KDTree;
5049
import net.imglib2.RealPoint;
5150
import net.imglib2.algorithm.MultiThreadedBenchmarkAlgorithm;
@@ -142,7 +141,7 @@ public Void call() throws Exception
142141
{
143142
final double[] coords = new double[ 3 ];
144143
final Spot spot = targetIt.next();
145-
TMUtils.localize( spot, coords );
144+
spot.localize( coords );
146145
targetCoords.add( new RealPoint( coords ) );
147146
targetNodes.add( new FlagNode<>( spot ) );
148147
}
@@ -159,7 +158,7 @@ public Void call() throws Exception
159158
{
160159
final Spot source = sourceIt.next();
161160
final double[] coords = new double[ 3 ];
162-
TMUtils.localize( source, coords );
161+
source.localize( coords );
163162
final RealPoint sourceCoords = new RealPoint( coords );
164163
search.search( sourceCoords );
165164

src/main/java/fiji/plugin/trackmate/util/TMUtils.java

Lines changed: 12 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,6 @@
4545
import fiji.plugin.trackmate.Dimension;
4646
import fiji.plugin.trackmate.Logger;
4747
import fiji.plugin.trackmate.Settings;
48-
import fiji.plugin.trackmate.Spot;
4948
import ij.IJ;
5049
import ij.ImagePlus;
5150
import net.imagej.ImgPlus;
@@ -324,21 +323,18 @@ private static final double[] getRange( final double[] data )
324323
}
325324

326325
/**
327-
* Store the x, y, z coordinates of the specified spot in the first 3
328-
* elements of the specified double array.
329-
*/
330-
public static final void localize( final Spot spot, final double[] coords )
331-
{
332-
coords[ 0 ] = spot.getFeature( Spot.POSITION_X ).doubleValue();
333-
coords[ 1 ] = spot.getFeature( Spot.POSITION_Y ).doubleValue();
334-
coords[ 2 ] = spot.getFeature( Spot.POSITION_Z ).doubleValue();
335-
}
336-
337-
/**
338-
* Return the optimal bin number for a histogram of the data given in array,
339-
* using the Freedman and Diaconis rule (bin_space = 2*IQR/n^(1/3)). It is
340-
* ensured that the bin number returned is not smaller and no bigger than
341-
* the bounds given in argument.
326+
* Returns the optimal bin number for a histogram of the data given in
327+
* array, using the Freedman and Diaconis rule (bin_space = 2*IQR/n^(1/3)).
328+
* It is ensured that the bin number returned is not smaller and no bigger
329+
* than the bounds given in argument.
330+
*
331+
* @param values
332+
* the values.
333+
* @param minBinNumber
334+
* a minimal number of bins.
335+
* @param maxBinNumber
336+
* a maximal number of bins.
337+
* @return a number of bins.
342338
*/
343339
public static final int getNBins( final double[] values, final int minBinNumber, final int maxBinNumber )
344340
{

0 commit comments

Comments
 (0)