Skip to content

Commit

Permalink
Remove useless method.
Browse files Browse the repository at this point in the history
  • Loading branch information
tinevez committed Jun 5, 2024
1 parent cc2e5b1 commit 41b8986
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 19 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,6 @@
import fiji.plugin.trackmate.SpotCollection;
import fiji.plugin.trackmate.tracking.SpotTracker;
import fiji.plugin.trackmate.util.Threads;
import fiji.plugin.trackmate.util.TMUtils;
import net.imglib2.KDTree;
import net.imglib2.RealPoint;
import net.imglib2.algorithm.MultiThreadedBenchmarkAlgorithm;
Expand Down Expand Up @@ -142,7 +141,7 @@ public Void call() throws Exception
{
final double[] coords = new double[ 3 ];
final Spot spot = targetIt.next();
TMUtils.localize( spot, coords );
spot.localize( coords );
targetCoords.add( new RealPoint( coords ) );
targetNodes.add( new FlagNode<>( spot ) );
}
Expand All @@ -159,7 +158,7 @@ public Void call() throws Exception
{
final Spot source = sourceIt.next();
final double[] coords = new double[ 3 ];
TMUtils.localize( source, coords );
source.localize( coords );
final RealPoint sourceCoords = new RealPoint( coords );
search.search( sourceCoords );

Expand Down
28 changes: 12 additions & 16 deletions src/main/java/fiji/plugin/trackmate/util/TMUtils.java
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,6 @@
import fiji.plugin.trackmate.Dimension;
import fiji.plugin.trackmate.Logger;
import fiji.plugin.trackmate.Settings;
import fiji.plugin.trackmate.Spot;
import ij.IJ;
import ij.ImagePlus;
import net.imagej.ImgPlus;
Expand Down Expand Up @@ -324,21 +323,18 @@ private static final double[] getRange( final double[] data )
}

/**
* Store the x, y, z coordinates of the specified spot in the first 3
* elements of the specified double array.
*/
public static final void localize( final Spot spot, final double[] coords )
{
coords[ 0 ] = spot.getFeature( Spot.POSITION_X ).doubleValue();
coords[ 1 ] = spot.getFeature( Spot.POSITION_Y ).doubleValue();
coords[ 2 ] = spot.getFeature( Spot.POSITION_Z ).doubleValue();
}

/**
* Return the optimal bin number for a histogram of the data given in array,
* using the Freedman and Diaconis rule (bin_space = 2*IQR/n^(1/3)). It is
* ensured that the bin number returned is not smaller and no bigger than
* the bounds given in argument.
* Returns the optimal bin number for a histogram of the data given in
* array, using the Freedman and Diaconis rule (bin_space = 2*IQR/n^(1/3)).
* It is ensured that the bin number returned is not smaller and no bigger
* than the bounds given in argument.
*
* @param values
* the values.
* @param minBinNumber
* a minimal number of bins.
* @param maxBinNumber
* a maximal number of bins.
* @return a number of bins.
*/
public static final int getNBins( final double[] values, final int minBinNumber, final int maxBinNumber )
{
Expand Down

0 comments on commit 41b8986

Please sign in to comment.