From b2cc9e13298b3705a8358252a8e3bcd3058621e9 Mon Sep 17 00:00:00 2001 From: tpietzsch Date: Fri, 5 Apr 2024 20:12:08 +0200 Subject: [PATCH] Adapt API changes introduced by https://github.com/imglib/imglib2/pull/333 --- .../tracking/kdtree/NearestNeighborFlagSearchOnKDTree.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/main/java/fiji/plugin/trackmate/tracking/kdtree/NearestNeighborFlagSearchOnKDTree.java b/src/main/java/fiji/plugin/trackmate/tracking/kdtree/NearestNeighborFlagSearchOnKDTree.java index b5e639341..98a5e00dd 100644 --- a/src/main/java/fiji/plugin/trackmate/tracking/kdtree/NearestNeighborFlagSearchOnKDTree.java +++ b/src/main/java/fiji/plugin/trackmate/tracking/kdtree/NearestNeighborFlagSearchOnKDTree.java @@ -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 > > { @@ -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 );