diff --git a/src/main/java/net/imglib2/algorithm/kdtree/VolumetricSearch.java b/src/main/java/net/imglib2/algorithm/kdtree/VolumetricSearch.java index e818d1334..df2f5ab96 100644 --- a/src/main/java/net/imglib2/algorithm/kdtree/VolumetricSearch.java +++ b/src/main/java/net/imglib2/algorithm/kdtree/VolumetricSearch.java @@ -185,10 +185,10 @@ public List< I > find( final RealLocalizable pt ) // which still could be lower. // Otherwise (coordinate is smaller/equal position, take the // right branch as well - if ( node.left != null ) - toDo.push( node.left ); - if ( node.right != null && node.getSplitCoordinate() <= position[ k ] ) - toDo.push( node.right ); + if ( node.left() != null ) + toDo.push( node.left() ); + if ( node.right() != null && node.getSplitCoordinate() <= position[ k ] ) + toDo.push( node.right() ); } else { @@ -198,10 +198,10 @@ public List< I > find( final RealLocalizable pt ) // which still could be higher. // Otherwise (coordinate is larger/equal position, take the left // branch as well - if ( node.right != null ) - toDo.push( node.right ); - if ( node.left != null && node.getSplitCoordinate() >= position[ k - numDimensions ] ) - toDo.push( node.left ); + if ( node.right() != null ) + toDo.push( node.right() ); + if ( node.left() != null && node.getSplitCoordinate() >= position[ k - numDimensions ] ) + toDo.push( node.left() ); } }