Skip to content

Commit

Permalink
Adapt API changes introduced by imglib/imglib2#333
Browse files Browse the repository at this point in the history
  • Loading branch information
tpietzsch committed Aug 28, 2024
1 parent 5e0af52 commit 514d5db
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@
import net.imglib2.Sampler;
import net.imglib2.neighborsearch.NearestNeighborSearch;


// TODO: revise for new KDTree implementation, where KDTreeNode are reusable proxies.
public class NearestNeighborFlagSearchOnKDTree< T > implements NearestNeighborSearch< FlagNode< T > >
{

Expand Down Expand Up @@ -78,8 +80,8 @@ protected void searchNode( final KDTreeNode< FlagNode< T > > current )
final boolean leftIsNearBranch = axisDiff < 0;

// search the near branch
final KDTreeNode< FlagNode< T > > nearChild = leftIsNearBranch ? current.left : current.right;
final KDTreeNode< FlagNode< T > > awayChild = leftIsNearBranch ? current.right : current.left;
final KDTreeNode< FlagNode< T > > nearChild = leftIsNearBranch ? current.left() : current.right();
final KDTreeNode< FlagNode< T > > awayChild = leftIsNearBranch ? current.right() : current.left();
if ( nearChild != null )
searchNode( nearChild );

Expand Down

0 comments on commit 514d5db

Please sign in to comment.